I performed some tests on a web page loading speed on four my websites that are hosted on different servers. The hosting providers are: 3ix.org, fatcow.com, and justhost.com. I used the same page with 20 photographs 500x300 pixels to make loading slower and catch speed difference. Also, I tested what page element affect loading speed most. I tried to add and remove pictures, java script code, google ads and affiliated ads from Comission junction and Sharesale.
I use the following PHP code. One piece of code I placed on the beginning of the speed.php page and one piece at the end of the page.
At the begining of the page I saved start time in the $start: variable
$starttime = microtime();
$time = explode(" ", $starttime);
$start = $time[1] + $time[0];
At the end of the page I saved end time in the $end variable:
$endtime = microtime();
$endtime = explode(" ", $endtime);
$end = $endtime[1] + $endtime[0];
//The difference gives us speed.php page loading time
$loadingtime = ($end - $start);
printf ("This page took %f seconds to load.", $loadingtime);
That is the result of my testing:
Now let us add to the page 3 google ads and test web page loading speed.
http://www.poetry-anthology.com, 3ix.org server 0.000147, 0.000132,0.000117, 0.000187, 0.000159s; browser:1.432, 1.528,1.5, 1.553, 1.506s
http://www.configure-all.com, fatcow.com server (this site)0.000142, 0.000131, 0.000126, 0.000125, 0.000135s; browser:1.64, 1.22, 1.355, 2.058, 1.919s
http://www.hardstuffez.com, fatcow.com server 0.000239, 0.000186, 0.000180, 0.000164, 0.000176s; browser:1.454,1.522, 1.516, 1.473s
http://www.best-your-trip.com,justhost.com server: 0.000119,0.000111, 0.000115, 0.000119, 0.000114s ; browser:1.711,1.471, 1.516, 1.451, 1.342, 1.462s
Details on my web site.