Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2
-
MOODLE_32_STABLE
-
MOODLE_33_STABLE
-
m33_
MDL-57789_Add_Cache_Control_Immutable_Support -
Description
Facebook suggested a new cache control header because they use a very similar system to Moodle for serving long lived css/images/css but were still finding 20% of their requests were a result of browser refreshes that returned 304 not modified. By adding this header, the browser will never check the same resource twice. This is appropriate for many parts of Moodle as a new unique url will be generated whenever the cache is purged.
https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/
https://bitsup.blogspot.co.uk/2016/05/cache-control-immutable.html
Chrome appear to have effectively decided to opt all resources into this, which should have a similar impact for the urls we'd want to add the header to, but may cause some other corner cases to not refresh.
https://blog.chromium.org/2017/01/reload-reloaded-faster-and-leaner-page_26.html
This may also help with situations I've seen where Moodle server problems can cause an avalanche of reloads as users all try to get it to work by repeatedly refreshing the page, and make the problem worse in a vicious cycle.
IETF draft document: https://tools.ietf.org/html/draft-mcmanus-immutable-00.
Attachments
Issue Links
- blocks
-
MDL-58027 Missing htmlentities() call when serving a stored_file
-
- Closed
-
- has been marked as being related by
-
MDL-58119 Use Cache-Control: immutable (backport of MDL-57789)
-
- Closed
-
- has to be done before
-
MDL-58027 Missing htmlentities() call when serving a stored_file
-
- Closed
-
-
MDL-58080 Add immutable caching support
-
- Closed
-
- Testing discovered
-
MDL-58112 Resources not loading with X-Sendfile ON
-
- Open
-