How to generate HAR file for given URL?

4,750 views
Skip to first unread message

hiren

unread,
Jan 16, 2011, 11:33:53 PM1/16/11
to HTTP Archive Specification
Hi, I want to know webpage performance of given URL, Specifically time
difference (between request and response) of each resource used in
given webpage (URL).

Google Page Speed API does the same, but it requires *.HAR file as
input, I don’t know how to generate HAR File for given URL.

Can you please guide me; I want to integrate this functionality to my
existing WPF application.

Thanks, Hiren Shah.

Jan Odvarko

unread,
Jan 17, 2011, 7:08:31 AM1/17/11
to HTTP Archive Specification
One possibility is to use following configuration:

* Firefox - the famous web browser

* Firebug - extension for Firefox that allows to monitor HTTP
communication for specific URL (see the Net panel for more info, some
docs: http://www.softwareishard.com/blog/firebug/firebug-net-panel-timings/)

* NetExport - extension for Firebug/Firefox that allows to export data
collected by the Net panel into HAR file - http://www.softwareishard.com/blog/netexport/

Honza

Pat Meenan

unread,
Jan 17, 2011, 9:05:08 AM1/17/11
to http-archive-...@googlegroups.com
If you're just looking for the response times for each request you're
probably going through way more hoops than you need to.

In Firefox, the Firebug Network tab will give you the per-request
times. In Chrome the "timeline" in the developer tools will do the
same. If the page is publicly available you can also run it through
WebPagetest (www.webpagetest.org).

-Pat

On 1/16/2011 11:33 PM, hiren wrote:
> Hi, I want to know webpage performance of given URL, Specifically time
> difference (between request and response) of each resource used in
> given webpage (URL).
>
> Google Page Speed API does the same, but it requires *.HAR file as

> input, I don�t know how to generate HAR File for given URL.

hiren

unread,
Jan 18, 2011, 1:01:45 AM1/18/11
to HTTP Archive Specification
Thanks Jan Odvarko,

But I'm afraid that i want to develop system using WPF Window (.NET),
I can not use Firefox & add-in,
As i mentioned earlier, Google Page Speed API does the same, but it
requires *.HAR file as
input,I don’t know how to generate HAR File for given PRIVATE URL.

Thanks,
Hiren Shah

On Jan 17, 5:08 pm, Jan Odvarko <odva...@gmail.com> wrote:
> One possibility is to use following configuration:
>
> * Firefox - the famous web browser
>
> * Firebug - extension for Firefox that allows to monitor HTTP
> communication for specific URL (see the Net panel for more info, some
> docs:http://www.softwareishard.com/blog/firebug/firebug-net-panel-timings/)
>
> * NetExport - extension for Firebug/Firefox that allows to export data
> collected by the Net panel into HAR file -http://www.softwareishard.com/blog/netexport/

hiren

unread,
Jan 18, 2011, 1:03:33 AM1/18/11
to HTTP Archive Specification
Thanks Pat Meenan,

But I'm afraid that i want to develop system using WPF Window (.NET),
I can not use Chrome or Firefox & add-in,
As i mentioned earlier, Google Page Speed API does the same, but it
requires *.HAR file as
input,I don’t know how to generate HAR File for given PRIVATE URL.

Thanks,
Hiren Shah

On Jan 17, 7:05 pm, Pat Meenan <patmee...@gmail.com> wrote:
> If you're just looking for the response times for each request you're
> probably going through way more hoops than you need to.
>
> In Firefox, the Firebug Network tab will give you the per-request
> times.  In Chrome the "timeline"in the developer tools will do the
> same.  If the page is publicly available you can also run it through
> WebPagetest (www.webpagetest.org).
>
> -Pat
>
> On 1/16/2011 11:33 PM, hiren wrote:
>
> > Hi, I want to know webpage performance of given URL, Specifically time
> > difference (between request and response) of each resource used in
> > given webpage (URL).
>
> > Google Page Speed API does the same, but it requires *.HAR file as
> > input, I don t know how to generate HAR File for given URL.

hiren

unread,
Jan 18, 2011, 1:31:45 AM1/18/11
to HTTP Archive Specification
Is there any tool will generate html URL to HAR?

hiren

unread,
Jan 18, 2011, 1:31:53 AM1/18/11
to HTTP Archive Specification
Is there any tool will generate html URL to HAR?

On Jan 17, 7:05 pm, Pat Meenan <patmee...@gmail.com> wrote:
> If you're just looking for the response times for each request you're
> probably going through way more hoops than you need to.
>
> In Firefox, the Firebug Network tab will give you the per-request
> times.  In Chrome the "timeline" in the developer tools will do the
> same.  If the page is publicly available you can also run it through
> WebPagetest (www.webpagetest.org).
>
> -Pat
>
> On 1/16/2011 11:33 PM, hiren wrote:
>
> > Hi, I want to know webpage performance of given URL, Specifically time
> > difference (between request and response) of each resource used in
> > given webpage (URL).
>
> > Google Page Speed API does the same, but it requires *.HAR file as
> > input, I don t know how to generate HAR File for given URL.

Jan Odvarko

unread,
Jan 18, 2011, 3:12:22 AM1/18/11
to HTTP Archive Specification
So, I guess by mentioning WPF Window, you are referring to "browser
hosted applications", which seems like proprietary MS technology based
on IE, correct?

If yes, you probably need a plugin/ActiveX into IE that intercepts
HTTP communication of your application, collects all necessary data
and finally produces HAR file.

According to:
http://www.softwareishard.com/blog/har-adopters/

Following tools support IE:
HttpWatch
IE9 Developer Tools
DebugBar

Or you could perhaps use some kind of a proxy like:
Fidller

Honza

hiren

unread,
Jan 18, 2011, 10:21:55 PM1/18/11
to HTTP Archive Specification
No, IT’s Desktop Based Application (using .NET Framework 3.5),

1st I have to host IE in that application

2nd Get HTTP Request & Response Log File

3rd Generate HAR File From Above Log File

4th Pass it to Google pagespeed API (har_to_pagespeed.exe), Which in
turn Generate Data

5th Using these data, I represent Tabular chart on my Desktop
application.

I cannot use any tool or I have to use open-source code.

Can you suggest me shortest way to produce same result? Because I
don’t know how do I achieve result of above 5 steps except 4 (usage of
har_to_pagespeed.exe).

Pat Meenan

unread,
Jan 18, 2011, 11:07:39 PM1/18/11
to http-archive-...@googlegroups.com
It's a bit convoluted but since you're already stringing together quite
the set of tools you could capture a packet trace using wireshark (or
the winpcap API's) and feed it to pcaphar
(http://code.google.com/p/pcaphar/) which can turn it into a har file
(assuming you're not also doing https).

-Pat

On 1/18/2011 7:21 PM, hiren wrote:
> No, IT�s Desktop Based Application (using .NET Framework 3.5),


>
> 1st I have to host IE in that application
>

> 2nd Get HTTP Request& Response Log File


>
> 3rd Generate HAR File From Above Log File
>
> 4th Pass it to Google pagespeed API (har_to_pagespeed.exe), Which in
> turn Generate Data
>
> 5th Using these data, I represent Tabular chart on my Desktop
> application.
>
> I cannot use any tool or I have to use open-source code.
>
> Can you suggest me shortest way to produce same result? Because I

> don�t know how do I achieve result of above 5 steps except 4 (usage of

hiren

unread,
Jan 18, 2011, 11:45:27 PM1/18/11
to HTTP Archive Specification
Thanks Pat,

Thanks Pat, my apology I haven’t mention that I am looking for trace
of both Http, Https request.

On Jan 19, 9:07 am, Pat Meenan <patmee...@gmail.com> wrote:
> It's a bit convoluted but since you're already stringing together quite
> the set of tools you could capture a packet trace using wireshark (or
> the winpcap API's) and feed it to pcaphar
> (http://code.google.com/p/pcaphar/) which can turn it into a har file
> (assuming you're not also doing https).
>
> -Pat
>
> On 1/18/2011 7:21 PM, hiren wrote:
>
> > No, IT s Desktop Based Application (using .NET Framework 3.5),
>
> > 1st I have to host IE in that application
>
> > 2nd Get HTTP Request&  Response Log File
>
> > 3rd Generate HAR File From Above Log File
>
> > 4th Pass it to Google pagespeed API (har_to_pagespeed.exe), Which in
> > turn Generate Data
>
> > 5th Using these data, I represent Tabular chart on my Desktop
> > application.
>
> > I cannot use any tool or I have to use open-source code.
>
> > Can you suggest me shortest way to produce same result?  Because I
> > don t know how do I achieve result of above 5 steps except 4 (usage of

Jan Odvarko

unread,
Jan 19, 2011, 3:09:43 AM1/19/11
to HTTP Archive Specification
On Jan 19, 4:21 am, hiren <hirenks...@gmail.com> wrote:
> No, IT’s Desktop Based Application (using .NET Framework 3.5),
>
> 1st I have to host IE in that application
So, you can still install an IE addon that would intercept HTTP
communication, no?

> 2nd Get HTTP Request & Response Log File
>
> 3rd Generate HAR File From Above Log File
>
> 4th Pass it to Google pagespeed API (har_to_pagespeed.exe), Which in
> turn Generate Data
>
> 5th Using these data, I represent Tabular chart on my Desktop
> application.
>
> I cannot use any tool or I have to use open-source code.
I don't understand what does it mean: "I cannot use any tool".

Honza

hiren

unread,
Jan 19, 2011, 4:57:58 AM1/19/11
to HTTP Archive Specification
Yes,

I got one project 'csExWB' form code project

http://www.codeproject.com/KB/miscctrl/csEXWB.aspx

it also gives me Request and response log.

Now, 3rd Generate HAR File From Above Log File?


Thanks,
Hiren shah

Jan Odvarko

unread,
Jan 19, 2011, 5:51:46 AM1/19/11
to HTTP Archive Specification
> Now, 3rd Generate HAR File From Above Log File?
I don't know about any .NET based library that would help you, but HAR
file is just a simple JSON file and its structure is described in
detail here:
http://groups.google.com/group/http-archive-specification/web/har-1-2-spec

You can also see some examples of existing HAR files here:
http://www.softwareishard.com/har/viewer/
(the viewer also validates HAR files so, you can check yours)

Honza

On Jan 19, 10:57 am, hiren <hirenks...@gmail.com> wrote:
> Yes,
>
> I got one project 'csExWB' form code project
>
> http://www.codeproject.com/KB/miscctrl/csEXWB.aspx
>
> it also gives me Request and response log.
>
> Now, 3rd Generate HAR File From Above Log File?
>
> Thanks,
> Hiren shah
>
> On Jan 19, 1:09 pm, Jan Odvarko <odva...@gmail.com> wrote:
>
> > On Jan 19, 4:21 am, hiren <hirenks...@gmail.com> wrote:> No, IT’s Desktop Based Application (using .NETFramework 3.5),
Reply all
Reply to author
Forward
0 new messages