Click here to Skip to main content
11,709,366 members (43,973 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IE7 IE8
To calculate page loading start time and complete load end time using some script or something like this in IE 8 ...
Posted 6-Nov-12 10:36am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here, it explains the logic of what you are trying to do: Page loading time script[^]

Something like:
Copy and paste the code below after <head> in a script tag
var d = new Date();
var starttime = d.getTime(); //Get the start time
Now find and paste this code before </body> in a script tag
var d2 = new Date();
var endtime = d2.getTime(); //Get the end time
//Find the difference between the start and end times
var totaltime = (endtime - starttime)/1000;
//Round 2 decimal places
var result = Math.round(totaltime*100)/100;
//Output results to a "P" element
document.getElementById("loadtime").innerHTML = "Page loading time: "+ result +" seconds";
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 580
1 OriginalGriff 250
2 Maciej Los 225
3 Peter Leow 219
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,027
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100