-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSS MIME types #989
Comments
Do you have any references for the browser behavior mentioned above? |
The EveryBlock source code (specifically the blog app) mentions this in a Python comment when creating the RSS link. Seems like it would be more appropriate to rectify this at the server level rather than a back-end language fix it. A search shows others encountering the problem. An old post: http://www.petefreitag.com/item/381.cfm. Problems were in Firefox and IE. His solution to use I did test on latest Chrome (17.0.963.56), Safari (5.1.3), and Firefox (10.0.2). I don't have Windows or any older versions, so maybe it's just for IE/older browsers. I tested with these URLs: http://app-xml.richardcornish.com Chrome was the most inconsistent. Declaring the type or omitting it in the HTML had no effect, sadly. What a waste. Chrome
Safari
Firefox
I do remember the "downloading" issue happening on older versions of Firefox. Still, it's a wide world of upcoming mobile and unpredictable browsers. |
Awesome detail. :D Thank you so much for diving deep into this one! |
How would this effect the compression and expiration headers for rss and atom feeds? |
@mikealmond I'm guessing not at all. Gzip and expiration declarations are in other places in the config. This is just a MIME type. They are all different. |
Based on research on the [issue list](h5bp/html5-boilerplate#989)
Modify the configurations so that: * `.atom` files are served with the `application/atom+xml`¹ media type * `.rss` files are served with the `application/rss+xml`² media type ------------------------------------------------------------------------ Until now the configurations ensured that `.atom` and `.rss` files were served with the `application/xml` media type, and that was done in order to prevent³ some browsers from opening a download prompt when users viewed these types of files directly. That however, in combination with the `X-Content-Type-Options: "nosniff"` header, prevents⁴ some browsers from doing something other than just showing the raw content of the files. By changing the media types we allow browsers to interpret the content of the files and do more⁴ then just display them in raw form (e.g.: show a nicer preview of the file, open the file in a local application), and thus, we improve the user experience. Note: One issue with this change is that IE 6 users will get the download prompt, but that isn't a big problem nowadays. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ¹ https://www.iana.org/assignments/media-types/application/atom+xml ² http://tools.ietf.org/id/draft-nottingham-rss-media-type-00.txt ³ h5bp/html5-boilerplate#989 ⁴ #50 (comment) ------------------------------------------------------------------------ Thanks Gennadiy Litvinyuk (@gennadiylitvinyuk)! Ref #50 Close #50
Based on research on the [issue list](h5bp/html5-boilerplate#989)
It seems you're missing setting the MIME type for RSS feeds in
.htaccess
. I can't find anything in previous issues about this, other than gzipping RSS flavors. I think it's important because when clicking on an RSS link, sometimes the browser tries to automatically download the feed rather than display it, which creates a poor user experience.I prefer
application/xml
overapplication/rss+xml
because the former avoids the issue stated above. Additionally, you can put the same MIME type on XML, which also seems to have been overlooked.The text was updated successfully, but these errors were encountered: