Is it necessary for some sites (& for me when going to them) to
put a / at the end of their address? Life is hard enough!
I’m going to expand on your question a little, because it actually
opens up a small can of worms … a small, but confusing can of
worms.
You see, the answer is “yes”, “no”, “sometimes” and “usually
not”.
There’s an amazing lack of consistency.
]]>
Let’s start with the “/”. The question boils down to this: is
the same as
and if not, which should you use?
In most cases, they’re the same. And by most cases, I’d say 99.99% of the time. You may find that once you get there the “/” has been added automatically, but that doesn’t really matter. Either approach works.
I’ll even go so far as to say that either should always work.
Most of the time.
The problem, of course, is that it’s quite possible for a web site to be ultra-picky and require one or the other, or behave differently between the two. I’d consider it a misconfiguration, but it’s possible. And which one you want will depend on how that server’s been (mis)configured.
In many ways, it’s the same as the old “www.” or not argument. You’ll note that both
and
take you to the same place. There’s actually no requirement that they do so. “www.” could be a completely different web site, though convention is to treat it as synonymous as the non-www version. I’ve definitely seen websites that fail to implement one or the other. That, once again, is a misconfiguration in my opinion.
And once again, which one you need depends on how that site was (mis)configured.
The part that I added on to your question is the “.html” versus “.htm” debate, since it too is something that site implementers choose and that the rest of us (visitors) then have to use and live with – and be confused by.
“.htm” and “.html” are both HTML (HyperText Markup Language) files. Web pages. They are the same thing, but with different names. And a web site that uses “.htm” likely will not respond to “.html”, and vice versa. It’s somewhat like identical twins who look a like and act alike but have different names and stubbornly insist that you call them by their correct names before they will react.
“.html” is the older, and more descriptive of the two. “.htm” comes from a time when web servers were being implemented in Windows, where extensions – the filename after the last dot – were limited to three characters in length.
The good news is that most of the time you need not know or care. You’ll go to a site, say http://ask-leo.com, and navigate by clicking on links, or saving bookmarks or copy/pasting URLS without ever typing one in or even noticing whether or not I use “.htm” or “.html” (or, as I do in some cases, something else entirely).
If *.html and *.htm are the same what about graphic files labelled as *.jpg and *.jpeg? I have graphic files with both these extensions.
29-May-2009
.JPG and .JPEG should be the same. Just in the old “DOS” days people had to use a 8.3 filename system, people could not use more then 3 letters after the period. Also I believe that why there is .html and .htm.
On many sites, if you typed .htm and the file has .html, the server will give you the correct page back (or vice versa)- unless there was both a .htm and a .html with the same name of course!
I know that my server certainly does (For tech heads out there, it’s Apache 1.3 – and it uses a server code of 301 (Moved Permanently) to implement the change automatically as far as the end-user is concerned)
As Leo says, it’s all in how the site’s server has been configured.
I look after several websites, some of which were written over 5 years ago. The older pages have the “.html” extension, and the newer pages that I have created (using Expression Web 2 and Dreamweaver) have the “.htm” extension.