Landing Page Load Time Analysis
With the new qualitly scores taking into account how fast your landing page loads, it is increasingly more important to build faster loading landing pages. And to analyze that we have a simple script, the same one we use on Prosper202.com (see below) that displays at the bottom of each page: how long it took to load. Below is the script that shows how to set this up.
Landing Page Code
<? $microtimer = microtime(); /*set the timer, this is to be placed at the top! */ ?>
<html>
<head>
<title>Title</title>
</head>
<body>
Blah Blah Blah, this is my content!
<? //print on the screen how long this page to took to load
$seconds = microtime() - $microtimer;
echo 'This page took ' . round($seconds,3) . ' seconds to load.'; ?>
</body>
</html>
Conclusion
So now at the bottom of each page it will say: This page took xxxxx seconds to load.



Craig Mullins on Oct 28, 2008 at 12:52am
Now we just need to set up a mysql database for logging various times of the day & to see how fast it loads for people in other areas
Wes (MasterlessSamurai,cin on Nov 24, 2008 at 12:28pm
question...
does this have to be above the opening HTML elements or is there another way we could use it? I read this article about IE6 breaking when anything is on the first line before the doctype declaration.
[url=http://www.communitymx.com/content/article.cfm?page=2&cid=E2F258C46D285FEE]http://www.communitymx.com/content/article.cfm?page=2&cid=E2F258C46D285FEE[/url]
i verified...my page doesnt fully validate when i have this code.
Wes (MasterlessSamurai.com) on Nov 24, 2008 at 12:28pm
question...
does this have to be above the opening HTML elements or is there another way we could use it? I read this article about IE6 breaking when anything is on the first line before the doctype declaration.
[url=http://www.communitymx.com/content/article.cfm?page=2&cid=E2F258C46D285FEE]http://www.communitymx.com/content/article.cfm?page=2&cid=E2F258C46D285FEE[/url]
i verified...my page doesnt fully validate when i have this code.
Wes Mahler on Nov 24, 2008 at 9:55pm
It is PHP code, it is displayed above the HTML, it won't break, because the PHP code isn't rendered.