![]() |
.HTML and .HTM
I know a lot about HTML and now I'm teaching myself PHP to make my
pages more dynamic. However, all this time, I have no clue what the difference is between .HTML files and .HTM files. Someone told me that ..HTM files were newer than .HTML files. Another source said that .HTM files worked better with links or something. |
Re: .HTML and .HTM
The Numerator wrote:
> I know a lot about HTML and now I'm teaching myself PHP to make my > pages more dynamic. However, all this time, I have no clue what the > difference is between .HTML files and .HTM files. Someone told me that > .HTM files were newer than .HTML files. Another source said that .HTM > files worked better with links or something. HTML files are HTML files, no matter what file extension they have (if they have one at all). A .html file extension is normal. A .htm file extension is typically legacy from DOS and Windows machines predating the mid-90s (which used filesystems which only supported three character file extensions). Over HTTP there are no file extensions, only URLs which might happen to have the characters ".html" in them as they might map directly onto a filesystem. -- David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/> Home is where the ~/.bashrc is |
Re: .HTML and .HTM
On Thu, 23 Mar 2006, David Dorward wrote:
[...] > Over HTTP there are no file extensions, only URLs which might happen > to have the characters ".html" in them as they might map directly > onto a filesystem. A pity that MSIE plays by totally different rules. In fact by several different sets of rules, depending on which version of MSIE is involved. I knew that there were some significant changes with XP SP2, but I wasn't fully aware of their implications. A discussion on dciwam called my attention to some new violations of RFC2616 introduced by the XP SP2 changes, to add to the ones which were known about before. http://groups.google.co.uk/group/de....73376bfa592bf5 As I just learned there, and then proved for myself -- On such a browser-like object, if you send it application/xhtml+xml with a .xhtml filename extension, it offers to download it; but if you send it with a .html extension (still with the XHTML content-type), it does its best to render it as HTML. Sigh. On my older Win2K system with IE6, on the other hand, it invites me to choose to either download the item or open it with Mozilla. Which by sheer chance is what it ought to do (for this specific content-type) according to RFC2616 and my own preferences settings. What a pity that they evidently have no intention of spreading that correct behaviour more widely (quite the contrary, judging from the observed XP-SP2 changes). |
Re: .HTML and .HTM
Alan J. Flavell wrote:
> On Thu, 23 Mar 2006, David Dorward wrote: > > [...] >> Over HTTP there are no file extensions, only URLs which might happen >> to have the characters ".html" in them as they might map directly >> onto a filesystem. > > A pity that MSIE plays by totally different rules. In fact by several > different sets of rules, depending on which version of MSIE is > involved. I knew that there were some significant changes with XP > SP2, but I wasn't fully aware of their implications. A discussion on > dciwam called my attention to some new violations of RFC2616 > introduced by the XP SP2 changes, to add to the ones which were known > about before. > http://groups.google.co.uk/group/de....73376bfa592bf5 > > As I just learned there, and then proved for myself -- > > On such a browser-like object, if you send it application/xhtml+xml > with a .xhtml filename extension, it offers to download it; but if you > send it with a .html extension (still with the XHTML content-type), it > does its best to render it as HTML. Sigh. Just out of interest, what does it do if you send application/xhtml+xml with an extention like ".php"? |
Re: .HTML and .HTM
The Numerator wrote:
> I know a lot about HTML and now I'm teaching myself PHP to make my > pages more dynamic. However, all this time, I have no clue what the > difference is between .HTML files and .HTM files. Someone told me that > .HTM files were newer than .HTML files. Another source said that .HTM > files worked better with links or something. File extentions (the bit after the dot) have no special meaning on the web. Windows uses them, and Apache usually does, but they're not universal in computing. |
Re: .HTML and .HTM
The Numerator wrote:
> I know a lot about HTML and now I'm teaching myself PHP to make my > pages more dynamic. However, all this time, I have no clue what the > difference is between .HTML files and .HTM files. Someone told me that > .HTM files were newer than .HTML files. Another source said that .HTM > files worked better with links or something. A file with a name that ends in '.html' is technically just a file with a name that ends in '.html'. Windows and some other operating systems recognise a file type based on the extension. In those operating systems, the extension .html refers to a file containing hyper text markup language. In reality any file can have an extension .html, but windows and some other OSs may have a problem determining the type of content. The difference between .html and .htm... Once upon a time, microsoft operating systems had a 8.3 file name limitation. The 8 referring to the number of characters in the file name and the 3 referring to the number of characters in the extension. On my Amiga, the computer that I was using back when DOS and Windows were stuck with 8.3, and on many other systems, the restrictions were not as limiting. It made more sense to some people to use a fourth letter to describe the html file type, since html was already a four letter acronym. To transfer the file to a windows computer, the fourth character had to be dropped, thus the creation of .htm files. As far as better or worse goes, there is a very slight performance improvement using .htm rather than .html in your file names. The addition of the single character is one extra character that has to be uploaded when retrieving the file. If however you are that concerned with bandwidth, there are lots of other ways to reduce the size of your files, such as removing excess white space from the live pages. Leave the white space in your development versions, and just strip it for the live version. Carolyn -- Carolyn Marenger |
Re: .HTML and .HTM
Alan J. Flavell wrote:
> A pity that MSIE plays by totally different rules. This is only true if you assume someone else's rules are the right ones. At the time Desktops were dominated by Microsoft. The makers of the "rules" happened to be on *nix. Plus look at the bandwidth microsoft is saving the world elmininating that one character. If every HTML page being called world wide was now HTM the savings would be huge! So rather than condeming Microsoft, we should be thanking them and scolding anyone that uses HTML... |
Re: .HTML and .HTM
Travis Newbury wrote:
> Alan J. Flavell wrote: >> A pity that MSIE plays by totally different rules. > > This is only true if you assume someone else's rules are the right > ones. At the time Desktops were dominated by Microsoft. The makers of > the "rules" happened to be on *nix. > > Plus look at the bandwidth microsoft is saving the world elmininating > that one character. If every HTML page being called world wide was now > HTM the savings would be huge! > [...] If that's the real reason you'd save even more bandwidth by configuring the server to serve html pages without any extension at all. Of course, that savings would be trivial compared to that which could be had if everyone optimized image sizes and used cleaner markup. (and yes, I know you were joking) Nick -- Nick Theodorakis nick_theodorakis@hotmail.com contact form: http://theodorakis.net/contact.html |
Re: .HTML and .HTM
On Fri, 24 Mar 2006, Jim Higson wrote:
> > On such a browser-like object, if you send it > > application/xhtml+xml with a .xhtml filename extension, it offers > > to download it; but if you send it with a .html extension (still > > with the XHTML content-type), it does its best to render it as > > HTML. Sigh. > > Just out of interest, what does it do if you send > application/xhtml+xml with an extention like ".php"? Just how "like" .php do you need it to be? (I couldn't - at least not within a limited amount of fiddling - persuade our server not to parse the file for PHP if I gave it that filename extension.) But I wouldn't have expected PHP to have any special meaning to MessIE. If I try some oddball filename extension, which I've also configured in our server to be sent as the XHTML content-type, application/xhtml+xml, then MessIE (XP SP2 IE6) offers to download this "unknown file type". http://ppewww.ph.gla.ac.uk/~flavell/...karlsruhe.karl However, if in Windows I create[1] a new "File Type", with filename extension .karl, and associate it with a web browser, say Firefox, then MessIE offers the option to open the file. If I take that option, it is evident that MessIE has downloaded a temporary copy to file, and has then invoked Firefox to open the temporary file. This is almost staggering towards the behaviour that the web interworking specifications require, and what www-compatible browsers have always implemented - what is wrong with IE is that it's going via the filename extension - when, according to RFC2616, it is required to honour the MIME type, without consideration of any "filename extension" which it might discern in the URL. h t h [1] e.g Windows control panel> Folder options> File Types |
Re: .HTML and .HTM
The Numerator wrote:
> what the difference is between .HTML files and .HTM files. There is no general difference. Absolutely no difference. If there was, then we'd all know it and we wouldn't keep worrying about whether there was or not. Use one and be consistent. Inconsistency here _is_ a nuisance. Many years ago, some flavours of Windows had a preference for .htm as only <=3 character extensions had good support. This is no longer the case. |
| All times are GMT. The time now is 12:59 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.