guid as a remedy for duplicates in RSS
Reading Habr through RSS for certain noticed that sometimes the same topic is duplicated in a tape. This happens when a post moves from one blog to another. The link changes, and RSS readers perceive it as a new topic. This behavior is easy to fix.
The uniqueness of a post in RSS is determined by the tag
When a post is transferred to another blog, it changes not only
The uniqueness of a post in RSS is determined by the tag
guid
. It can contain any string that uniquely identifies the message . Often, a permanent link to a post is used as a similar line. In this case, the tag is guid
usually set to an attribute isPermalink="true"
, although it can be omitted, because this is the default value. At the same time, using the link as guid
is not necessary at all, because for this the tag is provided in the RSS standard link
. Most RSS feeds contain tags guid
andlink
duplicated:http://habrahabr.ru/blog/google/38273.html http://habrahabr.ru/blog/google/38273.html
When a post is transferred to another blog, it changes not only
link
, but also guid
, which confuses readers. To avoid this situation, it’s enough to use guid
not a link, but a really unique line, which does not change under any circumstances. A id
post in the internal database is best suited for this purpose . In this case, you must set the attribute isPermaLink="false"
. In this case, the readers will use guid
to determine the uniqueness of the post, and link
- as a link:1234567890 http://habrahabr.ru/blog/google/38273.html