Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Measuring time to load page
- From: trojani2000 at hotmail.com (Troy III Ajnej)
- Subject: [Javascript] Measuring time to load page
- Date: Sun Jul 24 20:44:56 2005
First try this script and than go to it's Internet source and giv'em some feedback <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <script type="text/javascript"> <!-- Begin /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Abraham Joffe :: http://www.abrahamjoffe.com.au/ */ var startTime=new Date(); function currentTime(){ var a=Math.floor((new Date()-startTime)/100)/10; if (a%1==0) a+=".0"; document.getElementById("endTime").innerHTML=a; } var loopTime=setInterval("currentTime()",100); window.onload=function(){ clearTimeout(loopTime); } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <script type="text/javascript"> <!-- Begin document.write('This page took <span id="endTime">0.0</span> seconds to load.'); // End --> </script> <p><center> <font face="arial, helvetica" size"-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> Cheers! >From: Vinayakam Murugan <mvinayakam@xxxxxxxxx> >Reply-To: "\[JavaScript List\]" <javascript@xxxxxxxxxx> >To: "[JavaScript List]" <javascript@xxxxxxxxxx> >Subject: [Javascript] Measuring time to load page >Date: Sat, 23 Jul 2005 12:03:30 -0700 > >Hi > >I am working on a website which has to run on a kiosk like environment. >Performance is very crucial here. I would like to measure the time it takes >to load a page. I have tried > ><script > >//Record Start Time ></script> > >HTML Code > ><script> >//Record End Time >//Display both time ></script> > >Is this the most accurate way this can be measured? What happens if there >is >a heavy image and it is being fetched from the server. I want to know the >time taken to display all the elements on the page completely. > >-- >Warm Regards >~~~~~~~~~~~~~~~ >Vinayak >_______________________________________________ >Javascript mailing list >Javascript@xxxxxxxxxx >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
- Follow-Ups:
- [Javascript] Measuring time to load page
- From: Shawn Milo
- [Javascript] Measuring time to load page
- References:
- [Javascript] Measuring time to load page
- From: Vinayakam Murugan
- [Javascript] Measuring time to load page
- Prev by Date: [Javascript] Measuring time to load page
- Next by Date: [Javascript] Measuring time to load page
- Previous by thread: [Javascript] Measuring time to load page
- Next by thread: [Javascript] Measuring time to load page
- Index(es):