[Trac] Css expiration

Christopher Lenz cmlenz at gmx.de
Wed Feb 9 08:07:29 EST 2005


Am 08.02.2005 um 23:50 schrieb Emmanuel Blot:
> I just upgraded our Trac system today with the latest release from the 
> main branch. CSS and ClearSilver templates have changed since the last 
> upgrade, but it seems that the browser (FireFox) does not detect that 
> CSS files have changed. Therefore, some styles are lost in the new 
> pages, as Firefox keeps using the old CSS files instead of retrieving 
> the fresh ones.
>
> One solution is to force a refresh of the page in trouble (F5), but it 
> is not that easy to tell every single user in the team that if he/she 
> thinks there's a problem on a Trac page, he/she should manually 
> refresh the page. Closing/Re-opening the browser does not help.
>
> Coud Trac return an expiration header info to the browser, to force 
> the browser to refresh its cache, or something similar ?

As others have already responded, the static files are not under direct 
control of Trac.

That said, one option to get the caches flushed would be to copy the 
Trac htdocs to a different location on the web server and adjust the 
htdocs_location config option in trac.ini. The browsers will then have 
to fetch new versions of the static files, because they'll have to 
assume they're different resources.

After you think all clients have transitioned, you can change the 
htdocs_location back to what it was before, and remove the copy/link.

Hope that helps,
Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de



More information about the Trac mailing list