Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] how to find the time taken for loading a page


  • From: trojani2000 at hotmail.com (BEKIM BACAJ)
  • Subject: [Javascript] how to find the time taken for loading a page
  • Date: Mon May 26 14:58:49 2003

There is no standard procedure of this kind that I know of; -But you could 
build something like this:
(a plain example)
<script>
var d1,t1
d1=new Date()
t1=d1.getTime()

function downloadTime(){

   var d, t,s = 1000 ;

   d = new Date();
   t = d.getTime();

var dif=(t-t1)/s;

if (dif>59){
	dif=(dif/60);
alert(dif + ' minutes')}
	else{
	alert(dif+' seconds')
	}
}
</script>
<HTML>
<HEAD>

</HEAD>
<BODY onload="downloadTime()">...
(...the rest of the document goes here...)

Regards!


>From: "Jagannayakam" <jagann@xxxxxxxxxxxxxxxxxxx>
>Reply-To: "[JavaScript List]" <javascript@xxxxxxxxxx>
>To: <javascript@xxxxxxxxxx>
>Subject: [Javascript] how to find the time taken for loading a page
>Date: Fri, 16 May 2003 11:27:56 +0530
>
>Hi ,
>
>How to find the time taken for a page to get loaded in the browser.
>
>Regards,
>Jagan.
>
>_______________________________________________
>Javascript mailing list
>Javascript@xxxxxxxxxx
>https://lists.LaTech.edu/mailman/listinfo/javascript

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail