RSS feed without items

Posted by Jan Hancic on Stack Overflow See other posts from Stack Overflow or by Jan Hancic
Published on 2011-01-07T11:40:39Z Indexed on 2011/01/07 11:53 UTC
Read the original article Hit count: 200

Filed under:

I have webpage where I have a search page. I provide a "dynamic" RSS feed for search so that a user can subscribe to search results for any search term he likes.

So I was wondering what is the standard (or best practise) way to do if that search term returns 0 results which means I have no "items" to put in the feed. Do I just return an empty feed (only including the meta data and no item elements). Or should I put some special item element in the feed with some "no results" text?

edit: YouTube returns a feed without any item elements. If no-one can answer me I'll take it that this is the right way of doing it since I can't find any info elsewhere :)

© Stack Overflow or respective owner

Related posts about rss