Re: How to compute time to load page...

From: Date: Sun, 09 Dec 2001 05:40:47 +0000
Subject: Re: How to compute time to load page...
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-77144@lists.php.net to get a copy of this message
This is an Einstein problem :)) Maybe we need a time server .... However, we can have an alternative solution to get round turn time. Let's say on page A there's a link to a backend script. When the link is clicked, then use javascript to pick up current time T1 and pass it to the script. This script will send a page back to browser. Let's say this is page B. Time T1 is passed to the js of page B. And at the end of page B a js function will pick up current time T2. When the page rendered at local browser, we have both T1 and T2. Thus we calculate the time difference of a round turn. I know it is not a final solution but this is acurate. Hope someone else out there can give better solution. Alex ----- Original Message ----- From: "Jason G." <blair@nb.net> To: "Alex Shi" <chpshi@netvigator.ca>; <php-general@lists.php.net> Sent: Saturday, December 08, 2001 11:42 PM Subject: Re: [PHP] How to compute time to load page... > What about the small difference there will be between server time and local > time? > -Jason Garber > > At 10:40 PM 12/8/2001 -0500, Alex Shi wrote: > >Basically I agree with you. But the second time to get time must be done > >after the page is rendered on local browser. So I suggest to use Javascript > >for the second time to get time, and pass the first time value into a js > >function. > > > >Alex > > > > > >----- Original Message ----- > >From: "Andrew Forgue" <aforgue@agitated.net> > >To: "Jack Dempsey" <dempsejn@georgetown.edu>; "Torkil Johnsen" > ><torkil.johnsen@stud.hibo.no>; <php-general@lists.php.net> > >Sent: Saturday, December 08, 2001 9:42 PM > >Subject: Re: [PHP] How to compute time to load page... > > > > > > > Or this: > > > > > > at the beginning of your script, get the time using microtime > > > then at the bottom, you could get the time again, subtract > > > the difference and voila, thats how long the execution time > > > of your script is. > > > > > > -ajf > > > > > > ----- Original Message ----- > > > From: "Jack Dempsey" <dempsejn@georgetown.edu> > > > To: "Torkil Johnsen" <torkil.johnsen@stud.hibo.no>; > > > <php-general@lists.php.net> > > > Sent: Saturday, December 08, 2001 7:59 PM > > > Subject: RE: [PHP] How to compute time to load page... > > > > > > > > > > the search time is different than the page load time....google for > >example > > > > can find thousands of records in a tenth of a second, yet it takes > >longer > > > to > > > > get that html result back to your browser....you could estimate page > > > > download time by calculating the filesize and using the connection > > > > speed....certainly not 100% accurate, but it will give you a way of > > > > estimating..... > > > > > > > > jack > > > > > > > > -----Original Message----- > > > > From: Torkil Johnsen [mailto:torkil.johnsen@stud.hibo.no] > > > > Sent: Saturday, December 08, 2001 7:14 PM > > > > To: php-general@lists.php.net > > > > Subject: [PHP] How to compute time to load page... > > > > > > > > > > > > Hi All... (again) > > > > > > > > I was just wondering if anyone out there has made a function that will > > > > compute how long time (seconds, milliseconds) it will take to load a > >page? > > > > > > > > I see some search engines have a function that displays how long time > >the > > > > search took, and I'm looking for the same thing, to compare different > > > > designs and improve loading time for my "viewers". > > > > > > > > Anyone? > > > > - Torkil Johnsen > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-general-help@lists.php.net > > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-general-help@lists.php.net > > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >For additional commands, e-mail: php-general-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#77144) next »