Free Web Hosting PHP/mySQL
GlobalWeb.com.ru Forum Index GlobalWeb.com.ru
Free Web Hosting :: Commercial Web Hosting :: PHP/mySQL :: CGI/Perl
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

time to build up a page

 
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> PHP
Author Message
popinho



Joined: 12 Mar 2004
Posts: 51
Location: Austria

PostPosted: Fri Mar 12, 2004 1:06 pm    Post subject: time to build up a page Reply with quote

as the topic say i am searching for a script that tells me how long it took to load a page
Back to top
View user's profile Send private message MSN Messenger
erfg1



Joined: 04 Mar 2004
Posts: 36
Location: Florida

PostPosted: Fri Mar 12, 2004 1:58 pm    Post subject: Reply with quote

PART 1: (insert into HEAD tag)
Code:
<SCRIPT LANGUAGE="javascript">
loadtime="0"
loading=true
s="s"
{refresh()}
function refresh()
{setTimeout("count()",250)}
function count()
{if (loading)
{loadtime=loadtime+++0.25;refresh()}}
function done()
{if (loadtime==1)
{s=""}
alert("It took "+loadtime+" second"+s+" to load the page");loading=false}
</script>


PART 2: (insert into BODY tag)
Code:

<body onLoad="done()", followed by all other tags such as bgcolor, etc..


If you want it in PHP...
http://www.evilwalrus.com/viewcode.php?codeEx=355
_________________
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> PHP All times are GMT
Page 1 of 1

 


Free Web Hosting, Commercial Web Hosting, PHP/mySQL Copyright © 2009
Free Scripts Directory | Free Software Downloads | Newsgroups Directory | Optel.net | Mirroraty | Cruised.net | Hardware Keylogger