Make chrome display an rss feed (2)

后端 未结 2 1570
我寻月下人不归
我寻月下人不归 2021-01-15 17:28

This question is a follow-up on this one: get google chrome to view an rss feed

I copied the source code from this page (hope this is ok for the site-owner):
htt

相关标签:
2条回答
  • 2021-01-15 17:48

    Add doctype.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"> 
    
    0 讨论(0)
  • 2021-01-15 17:51

    Try changing the header to application/xml

    This worked for me by changing the header:

    <?php 
    header('Content-Type: application/xml');
    echo file_get_contents('http://web.student.tuwien.ac.at/~e0250890/rsstest/test.php');
    ?>
    

    Mozilla accepts a whole range of headers

    text/xml,application/xml,application/rss+xml,application/atom+xml

    But it seems chrome accepts only text/xml or application/xml

    Not 100% sure why, perhaps you should take it up with google ;p

    0 讨论(0)
提交回复
热议问题