Re: Calculating Page Load Time
Jim Auldridge <[email protected]>
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Quote Gale: "That'd give you the full request time, from the point the user clicked a link and started waiting all the way through to the end of the load process." But if you are calculating page load time because you are hoping to make your page more efficient, who cares how long it takes to get the HTTP request to the server? There isn't anything you can do to your page to speed up the transfer of the HTTP request. --Jim On 1/27/06, Gale, David <[email protected]> wrote: > Chris wrote: > > Although those complications all present themselves, this actually is > > a very good idea. You can always do a simple calculation to determine > > the download time of an item, or a set of items, but what matters > > usability wise is how long it takes from the user's request to the > > requested page being ready to use - that includes parse and > > initialization time, which is just the information you'd end up with. > > You could subtract the server's timestamp from the timestamp on the > > onload event, and send that back via AJAX to aggregate usability > > statistics on your site. You just might capture some surprising > > statistics relating to server lag or scripts that slow a machine to a > > crawl. > > > > You even could go so far as to only include the timestamp and script > > in every 1000 requests or so to get a good sample without burdening > > every single request. > > The problem here is that you require the server clock to be in sync with > the client's clock, which is more than likely not the case. Better > would be to have a generic onclick() function attached to all anchor > tags that calculates a time-stamp & appends it to the requested URL > (bonus points: make it only apply to internal URLs); each page could > then have a generic function that gets called when everything's loaded > up, and if the timestamp parameter was passed, calculate the difference > and feed it back to the server. That'd give you the full request time, > from the point the user clicked a link and started waiting all the way > through to the end of the load process. > > -David > > > Unsubscribe > [email protected] > > List info > http://www.quirksmode.org/dom/list.html > Yahoo! Groups Links > > > > > > > Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wdf-dom/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/