Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@sookie-T06sFW • Aug 21, 2009
Hi ce_neha,
As far as web is concerned there is no difference except an extra 'L' but basically this .htm and .html matters when there is a mismatch in the filename specified in the url and as processed by server.
Example :Consider following url which says I want .html file from the server
#-Link-Snipped-#
Now as you and me know .htm and .html are both same so I can use .htm also at the end right?So now try this url -same as above just changing .html at the end with .htm
#-Link-Snipped-#
But as server's default filename processing is such that it so not consider .htm and .html files same so it don't give desired page when I click on second modified url.
We can change such things in server configurations I guess such that it accepts .htm and .html file as same.
Am I sounding like an alien? Please correct me if anything wrong.
Thanks ! -
@safwan-NH7W5Y • Aug 22, 2009
As far as I know is when we make HTML file we save it as .htm and as said in above post no technical difference.
<a href="https://en.wikipedia.org/wiki/HTML" target="_blank" rel="nofollow noopener noreferrer">Html</a> -
@ce-neha-RCoDQE • Aug 22, 2009
Thanks sookie,
But i don't understand why browsers refer them as 2 different files?
Why two extensions are provided for saving a document? -
@sookie-T06sFW • Aug 23, 2009
Hi ce_neha,ce_nehaThanks sookie,
But i don't understand why browsers refer them as 2 different files?
Why two extensions are provided for saving a document?
I guess there is nothing to do with browser with this .htm and .html files. They just show what servers send them.so things depend on your server configuration as i mentioned earlier and regarding using two extensions for saving a file containing same code I think your query is answered well here #-Link-Snipped-#. I guess following explains what you are looking for
When the Web started, it ran almost exclusively on <a href="https://computer.howstuffworks.com/question246.htm" target="_blank" rel="nofollow noopener noreferrer">What is Linux and why is it so popular? | HowStuffWorks</a> machines and all pages were static. Html was the standard file extension. When people started using <a href="https://computer.howstuffworks.com/pc.htm" target="_blank" rel="nofollow noopener noreferrer">How PCs Work | HowStuffWorks</a> running DOS or Windows as <a href="https://computer.howstuffworks.com/web-server.htm" target="_blank" rel="nofollow noopener noreferrer">How Web Servers Work | HowStuffWorks</a>, however, the four letters in "html" were problematic. PCs followed an 8.3 naming convention that allowed only three letters in the extension. So the world made room for two standard extensions: html and htm. It used to be that you could tell whether a Web site was running on UNIX or Windows by looking at the file extension, but now there is no distinction. HowStuffWorks runs off a UNIX server but uses "htm" as its extension -- it's the webmaster's choice.
Addendum: Chek following two links -one ending with .html amd other ending with .htm
#-Link-Snipped-#
and
#-Link-Snipped-#
Both the above links give same output unlike the behavior of the links I mentioned in my pevious post.
One more thing I would like to add from my side. - See if you have same piece of HTML code and you are saving it in two different files one with .htm extension and one with .html extension and when you try to open those pages in your local machine, it is obvious both will give same output but if they are loaded at any server and if the server's configuration is such that it interprets both the files differently then the scenario I explained in my previous post would happen.
Hope your doubt is cleared now? Feel free to ask if any questions. 😀
Thanks ! -
@munguti-MnxkmE • Aug 23, 2009
Okay so they are the same. i understand that.
My question is why then do we have both of them? why not use one extension and stick to it? -
@sookie-T06sFW • Aug 23, 2009
hi Munguti,MungutiOkay so they are the same. i understand that.
My question is why then do we have both of them? why not use one extension and stick to it?
Have you looked at the link I gave in my #-Link-Snipped-#post and thing I explained there? And regarding sticking to one extension , I guess for it some standardizations would be needed.
Thanks ! -
@ce-neha-RCoDQE • Aug 24, 2009