RSS 指南实际上应该是_全球_唯一的吗?
只是想弄清楚 RSS 提要中的
元素实际上应该具有什么级别的唯一性。据我了解,其主要目的之一是软件可以用来识别该项目,以实现已读/未读跟踪等目的。但我的说法是否正确:
- 一旦使用了 guid,就永远不应该再次使用它,即使最后一个实例很久以前就已从 feed 中删除了?
- 它不仅在一个提要中应该是唯一的,而且在多个提要甚至(在可以实现的范围内)不相关的网站之间也应该是唯一的?
- 使用 URL 作为指南的原因之一是为了帮助实现上述目标?
此外,如果一个程序确实在不同的 feed 中两次遇到相同的 guid,会发生什么?
- 它会将它们视为不同的 RSS 项目,因为它们位于不同的提要中?
- 它们被认为是同一个项目,只是在多个地方发布(类似于 Usenet 交叉帖子)?
- 这取决于它们是否位于同一站点/域上?
- 行为未定义?
Just trying to clear up what level of uniqueness the <guid>
element in an RSS feed is actually supposed to have. I understand that one of its main purposes is to be something that software can use to identify the item for such purposes as read/unread tracking. But am I right that:
- once a guid has been used, it should never be used again, even if the last instance was removed from the feed ages ago?
- it should be unique not only within a feed, but also across multiple feeds and even (to the extent it can be achieved) unrelated websites?
- one of the reasons it's common to use URLs as guids is to help achieve the above?
Moreover, if a program does encounter the same guid twice in different feeds, what should happen?
- it treats them as distinct RSS items, since they are in different feeds?
- they are considered to be one and the same item, just published in multiple places (similar to Usenet crossposts)?
- it depends on whether they're on the same site/domain?
- the behaviour is undefined?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个很好的问题,但答案是否定的。
这是一个错误的术语选择。
指南对于 feed 来说必须是唯一的。
添加它们的目的是让聚合器能够确定以前是否见过该项目。本地唯一的 id 足以达到此目的。
It's a good question and the answer is No.
It was a bad choice of terminology.
The guids only have to be unique to the feed.
The goal in adding them was to have a way for an aggregator to know for sure whether or not it's seen the item before. A locally-unique id suffices for that purpose.