Last modified: 2012-10-22 20:26:10 UTC
PostEdit doesn't work when referrer is deactivated, because document.referrer returns an empty string. In Mozilla Firefox the [[HTTP referer]] can be deactivated on about:config with network.http.sendRefererHeader = 0 Is it possible to indicate isPostEdit() by a cookie, a variable or something else?
https://gerrit.wikimedia.org/r/#/c/28703/
We don't really need to check document.referrer. We did it out of paranoia, so I removed the check. But keep in mind that cookies can be disabled too, and we can't do anything in that case.
Why not do both? Prefer the cookie. If the cookie is missing check the refer(r)er. If the refer(r)er is missing do nothing.
The referrer by itself cannot be used to definitively detect post-edit state. It can merely complement a cookie-based approach by providing an additional sanity-check. Closing, as fix is in merge queue.