KBD

Keith Devens .com

Wednesday, March 17, 2010 Flag waving
There are two ways of constructing a software design; one way is to make it so simple that there are... – C. A. R. Hoare
← "Oil for Food" program (UNScam) was *itself* a reason to remove SaddamRed Tape Records →

Daily link icon Saturday, May 1, 2004

File extensions on the web

This is a very trivial question, but it's something for me to let my mind veg out about for a bit while I take intermittent breaks from writing a philosophy paper for my final exam.

File extensions:

  1. Files on the web generally shouldn't have extensions.
  2. If they do, it should be reflective of the contents of that resource, not the technology that produced the content. So, while '.php' or '.asp' as an extension is completely unacceptible (unless the resource actually does represent PHP or ASP source code), .html is arguably ok.
  3. However, as we've seen with HTML, even an extension that represents the content might not be appropriate in the long term. For instance, content that represents the "same resource" might earlier have been some version of HTML, but is now XHTML. So, the same resource might appropriately have the extension .html, .xhtml, or .xml. Along similar lines, people also argue about what Content-type the resource should be served with. Though, while the Content-type can change easily, the file extension should be much more stable.

This also gets peripherally into versioning issues. This is admittedly a special and particularly dysfunctional case, but if you were to have a '.rss' extension, should you have both a '.rss' and a '.rss1.0' extension for different versions, given how different the formats are? Though, usually different versions of file formats are backward compatible.

However, take that .rss extension. The RSS is really just XML, so shouldn't it just have an .xml extension? But, of course, XML is just plain text (unlike binary formats like jpeg or gif), so it might as well have a .txt extension. Though, .txt doesn't even mean the same thing everywhere, as you can have ascii text, unicode text, ebcdic text, etc.

This episode was precipitated by me considering adding a .xml extension to my RSS feed at http://keithdevens.com/weblog/rss. But, all of the above issues make me just want to ignore file extensions on the web altogether.

← "Oil for Food" program (UNScam) was *itself* a reason to remove SaddamRed Tape Records →

Comments XML gif

Alan Green (http://www.cardboard.nu) wrote:

It's nice if URLs make a certain amount of sense, because people look at them in the browser location bar. Since a '.html' or '.jpeg' can help people figure out what they are looking at, then they should be used.

The real travesty with "file extensions" on URLs is that some browsers (IE at least) will use the extension to determine the content type, ignoring the HTTP content-type header.

PS: What does ".web" mean? Smiley

∴ Alan Green | 2-May-2004 3:59pm est | http://www.cardboard.nu | #4476

Keith (http://keithdevens.com/) wrote:

What does ".web" mean?

Heh, nothing. It's part of the slug Smiley I use periods to separate words in the slug sometimes, a practice I got from CNN. It just as easily could have been "web.file-ext". Though, your question was probably rhetorical, so now I probably look silly answering it Smiley

The real question I have is... do you think I should put a .xml on my RSS (and later, Atom) feeds?

Keith | 2-May-2004 4:04pm est | http://keithdevens.com/ | #4477

Dinx wrote:

In my opinion, the use of "filename extensions" is a prehisthoric artifact introduced by "MS-DOS" some decades ago.

Yes, it could make some sense for the user to be able to determine the type of file he is dealing with.

But using a "filename extension"? Have a look at the Macs. They don't neet such a crap.

What I would like to have would rather be some kind of "general classifaction system" for files. I.e. one can add "attributes" to file-names and assign those attributes certain values. Platform independent ... of course.

So, for example: the .TXT file could be described as:
- Content=Text
- Charset=Ansi

an .EXE as
- Content=Program
- Executable=Yes
- Platform=Intel

.HTML
- Content=Web
- Charset=Blah (or ISOblub, etc)

I dont know if you get my idea ... what I am trying to say is: a simple crappy filename-extension will NEVER be enough to classify its content (when looking at the MEANING, the TECHNOLOGY, the VERSION and and and ...)

Imho it is necessary to establish some kind of "generic classification system" for .... ressources (not only for files ... not even only for files on the web! ... but in general!!)

∴ Dinx | 2-May-2004 4:56pm est | #4478

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 2 posts

Recent comments XML

new⇒I hate ASP.NET

I hate ASP... I was doing wonders​with PHP, then suddenly one of my​clients...

Johnies: Mar 17, 6:14am

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.113s.

(Used 8 db queries)