April 11, 2006

Content-Type is dead

What a simply stellar idea here - Hixie's Natural Log: Content-Type is dead - browsers were broken, server configs are broken, so there can't possibly be any reason to use this header. The browser can't use it, so nothing else should either.
I think it may be time to retire the Content-Type header, putting to sleep the myth that it is in any way authoritative, and instead have well-defined content-sniffing rules for Web content.


You shouldn't throw away the Content-Type header even if server configs aren't easily controllable by the author. Go ahead and do the right thing - use the document context and tags as a hint on how to handle the content, use the content-type along with the content itself. There's nothing wrong with applications retrieving the resources referenced by an img tag to assume that the retrieved content is an image.
The only arguments people may have is when there is little context available when retrieving content (no hypertext source document) and the retrieved content could be interpreted in several ways.

No comments: