Page MenuHomePhabricator

Add ClientHints header to action=history views when using cached response via HtmlFileCache
Closed, DeclinedPublic

Description

When wgUseFileCache is true, views of action=history and action=view pages by logged out users will be cached. This means that the "empty" Accept-CH header isn't set as the cache will return the cached HTML from a file. The file cache code then sets the headers and returns the response.

CheckUser should set the Accept-CH header for these cached responses when wgCheckUserClientHintsUnsetHeaderWhenPossible is true.

Event Timeline

Change 952524 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/core@master] [WIP] filecache: Add hook called when file cache is to be used

https://gerrit.wikimedia.org/r/952524

Change 952538 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] clienthints: Add headers when using file cache for history page

https://gerrit.wikimedia.org/r/952538

Blocked on decision whether to collect Client Hints data via the JS API on rollback instead of HTTP headers.

Moving back out of the current sprint until ways of doing T341094 are discussed.

Change 952524 abandoned by Dreamy Jazz:

[mediawiki/core@master] filecache: Add hook to add headers to HTMLFileCache response

Reason:

Not needed for the foreseeable future.

https://gerrit.wikimedia.org/r/952524

Change 952538 abandoned by Dreamy Jazz:

[mediawiki/extensions/CheckUser@master] clienthints: Add headers when using file cache for history page

Reason:

Not needed for the foreseeable future.

https://gerrit.wikimedia.org/r/952538