homepage Welcome to WebmasterWorld Guest from 54.242.140.11
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

    
Selecting a mime type for RSS
text/xml or application/rss+xml
encyclo

WebmasterWorld Senior Member encyclo us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 206 posted 3:11 pm on Mar 14, 2005 (gmt 0)

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?

 

Leffe

5+ Year Member



 
Msg#: 206 posted 3:28 pm on Mar 14, 2005 (gmt 0)

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.

teaperson

10+ Year Member



 
Msg#: 206 posted 7:08 pm on Mar 14, 2005 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved