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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

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

Post 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 ?
User avatar
spamyboy
Forum Contributor
Posts: 266
Joined: Sun Nov 06, 2005 11:29 am
Location: Lithuania, vilnius

Post by spamyboy »

I ges html would run faster.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post 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 ;)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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 ;)
Post Reply