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):
http://www.petefreitag.com/rss/.
I escaped all quotes and made a php file out of it. The file looks like this:
<?php header('Content-Type: application/rss+xml'); echo "<?xml version=\"1.0\" ?> <?xml-stylesheet type=\"text/css\" href=\"http://www.petefreitag.com/rss/simple_style.css\" ?> <rss version=\"2.0\"> <channel> <title>Pete Freitag's Homepage</title> <link>http://www.petefreitag.com/</link> <description>Covering ColdFusion, Java, Web Development, and other topics</description> <language>en-us</language> <lastBuildDate>Fri, 23 Mar 2012 18:57:00 GMT</lastBuildDate> <ttl>45</ttl> <item> REST OF THE SOURCE CODE </rss> "; ?>
Here you can see the result: http://web.student.tuwien.ac.at/~e0250890/rsstest/test.php
However, on http://www.petefreitag.com/rss/ chrome views the page as rss feed, in my example it shows just the source code.
What is the difference and how can I force chrome to view the page as rss feed?