Google Chrome rendering XML as text for RSS feed

守給你的承諾、 提交于 2019-11-30 06:02:17

This is a known bug in chrome that has yet to be fixed, chrome does not display xml rss feeds with any formatting whatsoever.

Update: There is now an RSS subscription / reader extension for Chrome.

I had this same problem and I used "application/xml" and it fixed it right up. Chrome doesn't like "application/rss+xml".

Bottom line, RSS support isnt used by "majority" of users, and as such they are only implementing it as an extension, for now. The extension is available here: RSS SubscriptionExtension

There's a detailed discussion of this on the closing comment for the bug - you can read the developer notes here: Comment 149

Try changing the header to text/xml and see if it helps:

header("Content-Type: text/xml; charset=ISO-8859-1");

try the chrome extension "XML Tree"

Short answer: add "view-source:{feedurl}"

Note that when the url ends with .xml and is recognized as a feed by chrome, Chrome annoyingly opens a Save File dialog. But many feed urls don't end with an extension (i.e. .xml), such as:

http://feeds.feedburner.com/ScottHanselman

At root, that url is still a regular, xml feed, but for us coders who just want to see the real xml, Chrome and the others in this case show you a human readable display of the feed (very annoying!).

So the answer to both of these problems is contained in the comment above given by Arne Roomann-Kurrik. He should have put it as an answer, because it works!

view-source:http://feeds.feedburner.com/ScottHanselman You don't even need "http://".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!