View Ticket
Not logged in
Ticket UUID: 71bd5502ffc43a415862faaa707d1513b5bb32eb
Title: Browser caching CSS and logo
Status: Open Type: Feature_Request
Severity: Minor Priority:
Subsystem: Resolution: Open
Last Modified: 2010-07-19 11:29:33
Version Found In: 15b293259d
Description & Comments:
Hello,

When using fossil ui on a repository, and then on another one, using same port, the logo and the stylesheet for the first repository are still in browser cache, and therefore the browser is not displaying what it should.

Proposed workaround:

  • Each time the logo or the stylesheet changes, compute its new SHA1 sum
  • Embed URIs of this form in the HTML code: $baseurl/logo/{LOGO_SHA1SUM} or $baseurl/style.css/{STYLESHEET_SHA1SUM}
  • On client side (browser) each logo and stylesheet will be cached, but every time a change is needed it is automatic
  • On server side, optionally ignore the /SHA1SUM part in the URL, and always serve current logo and stylesheet as the previous ones are not stored.

anonymous added on 2010-07-19 11:29:33:
I think it would be wiser to not ignore the sum but serve only the URL with the correct checksum if checksummed URL is requested.

If the checksum was ignored and you changed the repo which is served on a particular address (either by editing the repo or by changing some redirection) then the new style could be cached on an URL referenced from an old page which is exactly what is to be avoided.