Page 1 of 1

which page loads faster? .php .htm or .shtml

Posted: Thu Jan 05, 2006 2:01 pm
by jaymoore_299
Earlier I had a shtml file and included some php code in it, and within that code there was a setcookie command. Whenever I ran this code everything in the included php code ran fine except for the setcookie. I had to change my .shtml page into a php page and have the section with the setcookie code written out in that page to get it working.

However, I was wondering now that I changed my page to .php , will it load slower than if it was a shtml or an html ?

Posted: Thu Jan 05, 2006 2:04 pm
by spamyboy
I ges html would run faster.

Posted: Thu Jan 05, 2006 2:11 pm
by Charles256
i'm fairly certian it is based on what is on the page rather than what extension you use....but..you can test it :-D (then take into account your server). write out a html page, then give it a php extension. run it through a speed tester...pretty sure it'll be the same ;)

Posted: Thu Jan 05, 2006 5:23 pm
by John Cartwright
Well think about it, a .php has to involke the php engine, .html does not

The difference would be extremely little, unless of course your php page does processing

Posted: Thu Jan 05, 2006 5:28 pm
by timvw
The problem is that .shtml usually means that it's allowed to have <-- cgi include --> tags.. And for each of those tags a (cgi) binary (php exectuable) is started.. That is really slow ;)