What are the guidelines around filters and querystring parameters in RSS Feeds?
I run a site where users can upload content that is tagged by a special set of tags. While implementing RSS feeds, I was wondering what, if any, rules or guidelines exist for using a querystring to filter what content an RSS feed shows. For example, the feed that shows all content on the site would be:
/feed
If someone was i开发者_运维知识库nterested in all the work that was tagged with fashion, the URL would be
/feed?tag=fashion
There are no specifications or guidelines around the URI for the the RSS feed. You don't even really need to have a .xml extension for it. You could serve it up from .rss or even /feed
On top of that, it doesn't matter what you put in the query string so long as the document that renders to the browser or the feed reader accepts it as valid and well-formed RSS.
That's it. Have it validate and it doesn't matter what you put in the URL.
However, if you're using this at the end:
<atom:link href="http://example.com/feed" rel="self" type="application/rss+xml"/>
Then you'll want to encode the query string.
精彩评论