I'm using WordPress 1.5 to build a blog-like site which offers RSS feeds. The default generated RSS 0.92 and 2.0 feeds are sent as text/xml and with a HTTP header and XML declaration of the charset as UTF-8. However, in the <head> of the default theme, the link to the RSS 2.0 feed is as follows: <link rel="alternate" [b]type="application/rss+xml"[/b] title="RSS 2.0" href="http://example.com/feed/" />
Obviously, one of these is wrong. I know that
text/xml is on the way out and has encoding problems (which don't occur in my case, though). Should I correct the feed(s) to send the mime type application/rss+xml or should I correct the header in the XHTML document instead? Do RSS readers adequately support application/rss+xml?
application/rss+xml is the most correct. I don't see how newsreaders could have any problems with that, all they do is download the feed ignoring any MIME type. text/xml might be better if you want to view it as plain XML in a browser such as Firefox though, rss+xml might prompt for a download.
It may be odd to have the two MIME-types, but it is the common usage. The <link> tag is there to tell RSS software where the feed related to the page is located. So that tag is only targeted at the RSS software. The MIME-type on the file itself is available to other software, like a browser. So it is typically given the type text/xml, because that is what it is.