> It's almost like guessing MIME type based on the file content (hint: IE).
Hint: Linux? It does something similar pretty much on the OS level.
Hint: Linux? It does something similar pretty much on the OS level.
The HTTP protocol specifies that, if the server says a document is 'text/plain', the client must not attempt to second-guess it based on content.
IE second-guesses it based on content, so you cannot serve up something that looks like HTML as text/plain to get it to display.
Substantially worse, IMO.
That said, it'd be better to actually save content types in extended attributes or something. And make all applications magically save and respect these attributes.
I don't think Linux does anything remotely like this. It does allow you to use "file" utility to guess the contents of the file, but it doesn't act on it.