Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1867 closed enhancement (fixed)

Prevent browsers from caching scripts and style sheets between releases

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.3.2
Component: web Version:
Keywords: Cc:

Description

Usually, caching is a good thing since the scripts and style sheets are static. Except that when a new BASE version is released there may be important changes. Currently, browsers tend to cache the scrips and style sheets too long and often a manual cleanup of the browser cache is required.

A simple solution is to append ?build-number to the URL for loading the scripts and style sheets. This is very easy since it is done in only one place.

One complicating factor is that extensions need to do the same thing but they are released independently from BASE so we can't use the build number in this case. I think it should be possible to use the version number of the extension.

Change History (2)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [6562]) Fixes #1867: Prevent browsers from caching scripts and style sheets between releases

Append version numbers to URLs for scripts and style sheets. Uses BASE version (?v=3.3.2) except for files in /extensions directory which uses the extension version (?v=2.16.1).

comment:2 by Nicklas Nordborg, 10 years ago

(In [6570]) References #1867: Prevent browsers from caching scripts and style sheets between releases

Now also checks if an absolute path is pointing to a file from an extensions and uses the version from the extension if so.

Added the same functionality to taglibs used by extensions to add extra scripts and style sheets.

Note: See TracTickets for help on using tickets.