Page MenuHomePhabricator

Do not put "diff generator" comments into feeds
Closed, ResolvedPublic

Description

Gentlemen, please do not put
"<!-- diff generator: internal 2009-09-07 20:40:16 -->"
comments into feeds!

Many RSS readers make a checksum, and this changing item
causes articles to appear new each time!

No other feed providers do this.


Version: 1.16.x
Severity: normal
URL: http://article.gmane.org/gmane.emacs.gnus.user/12856

Details

Reference
bz20601

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:47 PM
bzimport set Reference to bz20601.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 6546
turn off damaging debugging comments in production environment

You don't understand how serious the problem is.
For rapidly changing wikis, users won't notice the problem.
But for small wikis, you will be doubling the users RSS stored articles each
time he browses... and he will wonder why they have reappeared again as
new.

Let's see the difference in the same HTTP GET of
index.php?title=Special:RecentChanges&feed=rss
before and after doing
TRUNCATE TABLE objectcache:

@@ -24 +24 @@

  • <lastBuildDate>Sun, 13 Sep 2009 00:09:25 GMT</lastBuildDate>

+ <lastBuildDate>Sun, 13 Sep 2009 00:12:10 GMT</lastBuildDate>
@@ -87 +87 @@
-&lt;!-- diff generator: internal 2009-09-13 00:09:26 --&gt;
+&lt;!-- diff generator: internal 2009-09-13 00:12:10 --&gt;

Well, we see the lastBuildDate holds the same information, so the
attached patch to remove the superfluous diff generator comment will not
remove any information, and at the same time not confuse RSS readers
into thinking the article has changed!

The better maintained a wiki is (the more often it is updated), the more
frustrated the user becomes, as each update truncates the objectcache,
causing the comments you are putting into the bodies to change.

Keep your debugging comments off in production environments please.

Attached:

Removing patch keyword, not a desirable solution.

And furthermore:
"But I'm only putting comments into an XML feed." No you are not.
Comments look like <!-- ... -->, not encoded.

"But I provide a Last-modified HTTP header." Yes, however all it takes
is for one item in the feed to change, and then we get all the items
which contain diffs change. Caching 101... the basics, don't spoil it.

Committed similar solution in r56406.