Fossil

View Ticket
Login

View Ticket

2014-01-02
15:40 Closed ticket [71bd5502ff]: Browser caching CSS and logo plus 4 other changes ... (artifact: 4dae2a8fad user: jan.nijtmans)
2010-07-19
11:29 Ticket [71bd5502ff]: 2 changes ... (artifact: 2654f4e30e user: anonymous)
2010-07-16
08:59 New ticket [71bd5502ff]. ... (artifact: db66a43c0e user: BMorgat)

Ticket Hash: 71bd5502ffc43a415862faaa707d1513b5bb32eb
Title: Browser caching CSS and logo
Status: Closed Type: Feature_Request
Severity: Minor Priority:
Subsystem: Resolution: Fixed
Last Modified: 2014-01-02 15:40:47
Version Found In: 15b293259d
Description:
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.

User Comments:
jan.nijtmans added on 2014-01-02 15:40:47:

Fixed in [daff9d2062]