RSS feed: how to recommend an update interval?

青春壹個敷衍的年華 提交于 2019-11-27 06:52:28

问题


When publishing an RSS feed, is there some attribute in the XML that can be used to recommend the update interval/frequency?

And if its not part of the standard, is there some generally recognised way?


回答1:


The specification here http://www.rssboard.org/rss-specification#requiredChannelElements has these optional parameters specified for the channel element:

These to tell clients when they don't need to update..

skipHours - A hint for aggregators telling them which hours they can skip. This element contains up to 24 < hour > sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the < skipHours > element. The hour beginning at midnight is hour zero.

skipDays - A hint for aggregators telling them which days they can skip. This element contains up to seven < day > sub-elements whose value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. Aggregators may not read the channel during days listed in the < skipDays > element.

and/or this for telling clients how often they need to update.

ttl - ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source.



来源:https://stackoverflow.com/questions/6389255/rss-feed-how-to-recommend-an-update-interval

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!