.HTML and .HTM

T

The Numerator

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.
 
D

David Dorward

The said:
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.
 
A

Alan J. Flavell

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...ng.misc/browse_thread/thread/6d73376bfa592bf5

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).
 
J

Jim Higson

Alan said:
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...ng.misc/browse_thread/thread/6d73376bfa592bf5

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"?
 
J

Jim Higson

The said:
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.
 
C

Carolyn Marenger

The said:
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
 
T

Travis Newbury

Alan said:
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...
 
N

Nick Theodorakis

Travis said:
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
 
A

Alan J. Flavell

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/tests/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
 
A

Andy Dingley

The said:
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.
 
J

Jonathan N. Little

Nick said:
Travis said:
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)

Why should I optimize? MS Publisher does a dandy job of keeping all the
styling handy right there interspersed throughout my markup! And why
bother resampling those 3000+ pixel on a side images when I can
miraculously make instant thumbnails with width and height attributes?
Then I can fit 50 or more images on a page!
 
A

Alan J. Flavell

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.

I suspect that you're being ironic. Unfortunately there may be many
readers who know so little history that they might literally believe
you.

Have a look at
http://www.w3.org/History/19921103-hypertext/hypertext/WWW/Status.html
and see if you can discern dominance of any particular OS. NeXT,
VAX/VMS, IBM VM/CMS, Macintosh, all feature in different ways.

(P.s the claim made in that page that the VM/CMS browser was
non-existent was not really true. Some of us supported a port of the
W3 client to VM/CMS: it wasn't very good, but it certainly wasn't
"nonexistant"(sic) as that document claims. In fact, see
http://www.w3.org/History/19921103-hypertext/hypertext/WWW/LineMode/vm-cms/Overview.html
But that's all a long time ago now)

But the MIME and HTTP specifications are not just a private affair of
the WWW - they have proper IETF standards-track specifications about
their behaviour on the Internet. They are carefully defined to be
rather OS-agnostic. *If* the claim had been true that they were
unix-centric, do you suppose they would have defined the canonical
newline representation to be CRLF? Surely it would have been LF
alone, just as it is in unix?
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...

I know you're joking, really, but...

We would be entitled to scold /anyone/ who uses filename extensions in
their URLs. To anyone who takes theory as more important than
practice, it's clear that they have no business being there at all.

(If you /really/ care about network bandwidth, you should be aware
that most browsers nowadays support gzip compression, and (x)HTML
lends itself very well to such compression. You could save file space
too, in that way).
 
M

Matt Clara

Alan J. Flavell said:
I suspect that you're being ironic. Unfortunately there may be many
readers who know so little history that they might literally believe
you.

Have a look at
http://www.w3.org/History/19921103-hypertext/hypertext/WWW/Status.html
and see if you can discern dominance of any particular OS. NeXT,
VAX/VMS, IBM VM/CMS, Macintosh, all feature in different ways.

(P.s the claim made in that page that the VM/CMS browser was
non-existent was not really true. Some of us supported a port of the
W3 client to VM/CMS: it wasn't very good, but it certainly wasn't
"nonexistant"(sic) as that document claims. In fact, see
http://www.w3.org/History/19921103-hypertext/hypertext/WWW/LineMode/vm-cms/Overview.html
But that's all a long time ago now)

But the MIME and HTTP specifications are not just a private affair of
the WWW - they have proper IETF standards-track specifications about
their behaviour on the Internet. They are carefully defined to be
rather OS-agnostic. *If* the claim had been true that they were
unix-centric, do you suppose they would have defined the canonical
newline representation to be CRLF? Surely it would have been LF
alone, just as it is in unix?


I know you're joking, really, but...

We would be entitled to scold /anyone/ who uses filename extensions in
their URLs. To anyone who takes theory as more important than
practice, it's clear that they have no business being there at all.

(If you /really/ care about network bandwidth, you should be aware
that most browsers nowadays support gzip compression, and (x)HTML
lends itself very well to such compression. You could save file space
too, in that way).

Yup, Microsoft has never been concerned with the end user's bandwidth. Take
a look at this code I found on the site where I work. It was created by
copying and pasting directly from MS Word to a WYSIWYG editor:

<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo2;
tab-stops: list .5in"><span style="FONT-SIZE: 12pt; FONT-FAMILY: Arial;
mso-bidi-font-size: 10.0pt; mso-fareast-font-family: 'Times New Roman';
mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language:
AR-SA"><font face="Arial, Helvetica" size="2">To request a Compliance
Inspection, or Contact, please call the EAB Hotline at 866-325-0023 or email
at</font> <a href="mailto:blah at michigan.gov"><font face="Arial,
Helvetica" size="2">[email protected]</font></a><font face="Arial,
Helvetica" size="2">.</font></span></p>

All that to mark up a single sentence. Amazing.
 
K

kchayka

Matt said:
Take
a look at this code I found on the site where I work. It was created by
copying and pasting directly from MS Word to a WYSIWYG editor:

One of my favorite examples of MS bloat was an HTML email I received.
Including headers, it was over 9000 bytes. The actual message content
was a single sentence of less than 100 bytes.

According to the headers, it was created in MS Word. Unbelievable. :)
 
N

nice.guy.nige

While the city slept, kchayka ([email protected]) feverishly typed...
One of my favorite examples of MS bloat was an HTML email I received.
Including headers, it was over 9000 bytes. The actual message content
was a single sentence of less than 100 bytes.

I used to work in a government office here in the UK. Being Civil Service,
there were naturally thousands of users on the overall network. One day we
all got an email from one of the admins to warn us that - although it was
fun to add little bits of clipart and other such things to emails, making
them a little less dreary to the reader - this did in fact increase the size
of the email which was significant when it was being sent to such a large
number of people - causing the servers to creak...

This message went on to a list of bullet points on good and bad email
practice, and how to get a message across without increasing the load on the
servers so much. In all, it was a good concise message, about 10-15 lines
long.

Unfortunately - and with a most elegant irony - this message was in the form
of a 20k Word doc attached to the email!!!!! Oh how I giggled...

Cheers,
Nige
 
T

trippy

nice.guy.nige took the hamburger, threw it on the grill, and I said "Oh
wow"...
While the city slept, kchayka ([email protected]) feverishly typed...


I used to work in a government office here in the UK. Being Civil Service,
there were naturally thousands of users on the overall network. One day we
all got an email from one of the admins to warn us that - although it was
fun to add little bits of clipart and other such things to emails, making
them a little less dreary to the reader - this did in fact increase the size
of the email which was significant when it was being sent to such a large
number of people - causing the servers to creak...

This message went on to a list of bullet points on good and bad email
practice, and how to get a message across without increasing the load on the
servers so much. In all, it was a good concise message, about 10-15 lines
long.

Unfortunately - and with a most elegant irony - this message was in the form
of a 20k Word doc attached to the email!!!!! Oh how I giggled...

That's insane. Wow.
Cheers,
Nige

--
trippy
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM

NP: "The Way It Is" -- Tesla

"Now, technology's getting better all the time and that's fine,
but most of the time all you need is a stick of gum, a pocketknife,
and a smile."

-- Robert Redford "Spy Game"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top