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

Description

Author: herd

Description:
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

Details

Reference
bz15543
bzimport set Reference to bz15543.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Sep 10 2008, 1:37 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".

fixed in r40697.

brion added a comment.Sep 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