FREE tutorial,solution,RSS Feeds on Operating Systems, Programming, Web Development, Applications, Databases, Networking, Hardware, Security, SEO Free Expertsforge Membership
Join us as Moderator
Submit Article to Expertsforge.com Submit Article My Expertsforge
 
RSS Feeds, Help Help RSS Feeds
bannertop
 

ASP Tutorial: How to find out the Page Load time using ASP

jawahar
4/16/2005 1:50:41 PM, Views: 1831
This simple script shows how to display the time it takes for a page to load . This is a feature which is used on several sites . The basic procedure is simple you just have 2 times one for when the page loads and one for when the page stops loading . You would place the start script at the top of the page and the end script at the bottom of the page.

Here is the first script

<%
Dim starttime
starttime = Timer
%>


this would be placed right at the top of your page . Now for the second part of the script this would be ideally be placed after any other scripts in your page , graphics , main content etc

<%
Dim endtime , timetaken
endtime = Timer
timetaken = FormatNumber(endtime - starttime , 4)
Response.Write "This page took " & timetaken & "seconds to load"
%>


This simply subtracts the 2 times , formats them and displays the result
on the page .
Next Steps:
Add this Tutorial to:
Blink Blink del.icio.ous Del.icio.us Digg Digg
Fark Fark Furl Furl Google Google
Reddit Reddit Simpy Simpy Spurl Spurl
Technorati Technorati Windows Live Win Live Yahoo Yahoo
Rate Me!
Not Yet Rated!
Rate:
Send Private MessageSend Message
Signup / Login To View the Solution or Provide Comments
Post Comment/Solution
Comment:*
        (Link Rules) 
  Use : [bold] for <b>; [/bold] for </b>; [italic] for <i>; [/italic] for </i>; [code] & [/code] for code
 
Categories
Options
ASP RSS Feed
Most Popular Tutorial
Most Popular Solution
Top Rated
Top Contributors
Yearly
Overall
 
1. jawahar (200)
bnrtop