/    Sign up×
Community /Pin to ProfileBookmark

Whats the difference

…between .html files, .htm files and .shtml files

Don’t know if i asked this question here before or was it somewhere else

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@felgallMar 10.2007 — By default .html and .htm are ordinary HTML pages with no server side processing (this dates back to pre 1995 when windows only supported 3 character extensions). By default .shtml does server side include processing on the server before delivering the page. You can change these defaults if you wish.

For example on my site .html means that PHP processing gets done on the server before delivering the page while .htm means that server side include processing gets done. I don't use .shtml. This saved me having to rename the pages when I added the server side processing. To apply this change I put two lines in my .htaccess file.

AddHandler server-parsed .htm

AddType application/x-httpd-php .html
Copy linkTweet thisAlerts:
@ryanbutlerMar 10.2007 — While some (developers) do that in special cases, generally, newbies need to stay away from that. Using this method sometimes make newbies think HTML code needs to be processed before the page is returned to the browser, which isn't the case. If you design your site correctly from the start, adding handler's to Apache config file should never need to happen.
Copy linkTweet thisAlerts:
@Stephen_PhilbinMar 11.2007 — HTML is HTML. It doesn't matter what the file name or the bit of the file name after the "." is; it's completely irrelevant as far as the end user is concerned.

(To my knowledge) Only Windows pays any attention to what comes after the last dot in a file name as some sort of weird and inexplicable move to determine what type the file is, as opposed to actually checking the file its self.

It [b]can[/b] be used for server side software to determine how to handle certain files, but this is a very long way from a requirement. You can use many other ways to determine how files should be treated. Hell — you can have files handled in different ways depending on where your mobile telephone is, let alone what the name of a file is.
×

Success!

Help @Marcus_Maximus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...