Is the file extension important?
For instance, I have a CSS style sheet. I call it "hi.js", and then link to it with its MIME type as text/CSS. Does this work? Is it "illegal" to do?
Edit: it was just a question jeez, not like I'm actually going to do this
When HTTP is involved, file extensions are more or less meaningless. It is the content type that matters (the one that is sent by the server, not the one you tell the browser to expect using the type
attribute).
However, using misleading file extensions will: