How to write a code (in any programming language, preferably in java), which calculates the average loading time of any website (including all embedded elements such as images, Javascript, CSS, etc.) ?
-
I agree with dfa... you can use YSlow or FasterFox (without speed enhancements). Both will display the total load time. – Ascalonian Jun 05 '09 at 12:56
-
Or the developer tools built in to Chrome. – Nick Johnson Sep 23 '11 at 01:08
-
This belongs on the webmasters SE. – Nick Johnson Sep 23 '11 at 01:08
9 Answers
Google just released Page Speed (a plug-in for firebug, just like YSlow) and it's got some pretty cool features.

- 2,523
- 1
- 19
- 23
I think websiteoptimization.com has all you need :)

- 19,224
- 47
- 152
- 257
-
Right.... barfoon posted while I was typing. Try it. It gives you great feedback. – Steven Jun 05 '09 at 12:55
-
-
Right. I found this javascript code, but have not tested it: http://www.dreamincode.net/code/snippet1908.htm – Steven Jun 05 '09 at 13:07
I had used souptag framework to parse html page and then found individual src attribute of all the tags, Then individually found size of each page mentioned in src attribute and then according to my internet speed found out average loading time.

- 5,069
- 8
- 41
- 52
Perceived loading time is important too. External scripts will delay rendering of everything below them until they've loaded and executed, in all browsers, so it's best to push them to the very bottom of the page when possible, as opposed to the very top which is the habit of many developers. Another source of delay in some browsers is img tags where the width and height are unspecified. The browser will give the image some time to load so that it can get the layout right the first try. Fixing both those issues will make your site appear a lot more responsive, even if total loading time is unchanged.

- 2,164
- 13
- 11
I've always enjoyed using this tool: http://www.websiteoptimization.com/services/analyze/

- 27,481
- 26
- 92
- 138
Depends what you mean by 'average loading time'.
If you sit at your PC with your site running locally and just hit F5 over and over again you'll get considerably different results to someone looking at the same code which is deployed in a data centre on the other side of the world.

- 19,079
- 3
- 51
- 79
Fiddler is also another option. See the Fiddler home page
A nice screenshot of the transfer timeline is here.

- 5,430
- 41
- 58
This has a nice JavaScript way to check load time of a web page: http://javascript.internet.com/text-effects/loading-time-indicator.html

- 14,409
- 18
- 71
- 103
-
This site is down for maintenance it seems. I will check it again later. Thanks for letting me know. – Ascalonian May 04 '12 at 13:44