site CSS <link> URLs including $wgUser->mTouched;
Closed, ResolvedPublic

Assigned To
IAlex, wikibugs-l

Author: herd

r39766 rearranged some of the CSS calls in Skin.php and (as far as I can tell, although maybe it happened in an earlier revision) as a consequence of this:

if( $wgUser->isLoggedIn() ) {

		$siteargs['smaxage'] = '0';
		$siteargs['ts'] = $wgUser->mTouched;


now appears before the call to the site's dynamic CSS pages (Common.css, Print.css, Handhead.css, {skin}.css), which each include $siteargs. This causes all these pages to invalidate cache whenever a logged in user changes any preferences. As none of these depend on user preferences, they should not be getting invalidated by the ts= parameter. Suggest moving the $siteargs['ts'] = $wgUser->mTouched; or whole isLoggedIn() check /after/ the SiteCSS check.

Version: 1.14.x
Severity: minor

bzimport added a project: MediaWiki-Parser.Via ConduitNov 21 2014, 10:17 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz15543.
bzimport created this task.Via LegacySep 10 2008, 1:37 AM
bzimport added a comment.Via ConduitSep 10 2008, 1:58 AM

herd wrote:

Followup, $wgUser->mTouched; is updated every new session. This is not only on a change of preferences, but every login, and every new browser sessions. That is, if you close your browser and reopen it, all site css cache is now invalid. Bumping to "high", but dropping severity to "minor".

IAlex added a comment.Via ConduitSep 10 2008, 12:13 PM

fixed in r40697.

brion added a comment.Via ConduitSep 12 2008, 5:09 PM

Bumping priority back low -- I have no idea why it was bumped to "high". In fact, losing the assurance that site and user CSS will be up to date might be a bad thing.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.