开发者

How Many Items Should I have in an RSS feed? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.

Want to im开发者_Python百科prove this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 8 months ago.

Improve this question

All the information I could find regarding generating RSS feeds gives examples where an indeterminate number of items is returned.

That doesn't seem too practical, especially if I have a ton of entries and a ton of clients idly polling the feed.

Is there a magic number for how many items I should return? Should I just return everything I have?


I guess that depends on the type of information you syndicate, how often new items are added and the way your audience will use it.

If it's a news feed with dozens of new entries per day, 50 or 60 might be a good number, if it's only updated a few times per month or even less often, 20 will be more than enough.

If it's some kind of specialized information intended to be processed by other software, an entirely different number might be more appropriate.


There is no the magic answer here.

Just return some amount you think is enough.

In my user experience I've seen even feeds, that return 1 (one) item. As well as the ones, that returns ~100.

I think that the number of 20 is good compromise.

Also - you can rely on the period, not a specific number. In this case you could give the feeds added since last 24 hours, for example.


@Zerkms is correct IMO -> there is no magic number or industry standard, etc.

I feel like most people give a max of 20 items. If you want to be real tricky, give the consumer the option to specify the max number of items in the feed URL.

eg. http://www.yourWebSite.com/someFeed.rss?maxCount=whatever

It comes down to the content you are dishing up. Is it fresh/stale/a lot in a short period, etc.. ?


How many items should you give? Let's first answer another question: How many items can you give?

TLDR Answer

  • If you use RSS v. 0.91: use 15 items.
  • If you use RSS v. 1.00, v. 2.00, or later: use 100 items.

Your RSS Version Can Limit Your Items

If you are using RSS Version 0.91...

...a maximum of 15 items per channel is enforced at this time. (Source: RSS 0.91 Specification; emphasis mine.)

If you are using RSS Version 1.0, or 2.0, there is no limit that can be found in the specification. (Source: RSS 2.0 Specification.)

Should You Worry About Version 0.91's Limits?

Probably not, but maybe.

According to Wikipedia.com, based on data from 2007 (14 years ago)...

...the three main versions of RSS in current use are 0.91, 1.0, and 2.0, constituting 13%, 17%, and 67% of worldwide RSS usage, respectively.

Oddly enough, w3schools gives different numbers in 2015, which, based on their round numbers, are probably just guesses...

  • About 50 % of all RSS feeds use RSS 0.91
  • About 25 % use RSS 1.0
  • The last 25 % is split between RSS 0.9x versions and RSS 2.0 (Source: W3Schools.com.)

Handle All Cases

You can use the <description /> element in RSS to describe the feed, and here you can give useful information, like...

If you want this RSS feed in version 0.91, use this URL: example.com/news.rss?version=0.91

Then I just set the item count to 15 in this version. Otherwise I use about 100. This will only work if your RSS file is generated by a PHP file, which requires a little bit of back-end magic with .htaccess. But it provides a perfectly working RSS version for everyone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜