Google Chrome rendering XML as text for RSS feed

后端 未结 6 2075
有刺的猬
有刺的猬 2020-12-15 04:40

I have this script to generate an XML file for an RSS feed. Works great in every browser except Chrome. Chrome just renders the XML as text. Something to do with he

6条回答
  •  -上瘾入骨i
    2020-12-15 05:28

    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://".

提交回复
热议问题