SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    HI silver trophy Silverado4x4's Avatar
    Join Date
    Jan 2001
    Location
    USA
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Load time calculator

    Where can I find a script that will calculate how long it took for the page to load, then print it in front of the reader?

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm..well, you could probably write one to find the time at the beginning of the page, and then the same thing at the end of the page..and then compare?

    Best I can do as of now. If you want to know how to do it in ASP perhaps, I can do that.

    Good luck!!
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a quick script, you can change it to output to a div or whatever.
    Code:
    <script type="text/javascript">
    <!--
    loadTime = new Date();
    function checkTime(theDate){
    	tempDate = new Date();
    	var lTime = (tempDate.getMinutes() - theDate.getMinutes() ) + " min, ";
    	lTime += (tempDate.getSeconds() - theDate.getSeconds()) + " sec";
    	alert(lTime);
    }
    //-->
    </script>
    and put onLoad="checkTime(loadTime)" in the <body> tag.

  4. #4
    HI silver trophy Silverado4x4's Avatar
    Join Date
    Jan 2001
    Location
    USA
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I make it write it out as plain text instead of popping up?

    http://www.jokes-central.com/test.html


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •