Closed
Bug 1336504
Opened 9 years ago
Closed 9 years ago
Serve long-lived static asserts with a Cache-Control containing the 'immutable' directive
Categories
(Tree Management :: Treeherder, defect, P2)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
Details
Attachments
(1 file)
Even if static assets are served with a large Cache-Control max-age , browsers still ignore this in several cases - the most notable of which is the user hitting refresh (not even a force refresh).
As such, a new 'immutable' directive has been proposed, which means "no really, don't ask for this again before the max-age is up, unless the user does a force-reload using eg ctrl+shift+F5":
https://bitsup.blogspot.co.uk/2016/05/cache-control-immutable.html
https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/
This is now supported in Firefox (not other browsers for the moment), so we can start using it.
WhiteNoise has just added support for it out of the box, so all we need to do is update to the latest Whitenoise release :-)
Comment 1•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Attachment #8833367 -
Flags: review?(cdawson)
Updated•9 years ago
|
Attachment #8833367 -
Flags: review?(cdawson) → review+
Comment 2•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/ad2c56e1b241787ed13046b0b4e29d6ef46962cf
Bug 1336504 - Update whitenoise from 3.2.3 to 3.3.0
Notably this means long-lived static assets will be served with a
`Cache-Control` header that now contains the new `immutable` directive,
for improved browser caching behaviour. See:
https://bitsup.blogspot.co.uk/2016/05/cache-control-immutable.html
https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/
Changes:
http://whitenoise.evans.io/en/stable/changelog.html#v3-3-0
https://github.com/evansd/whitenoise/compare/v3.2.3...v3.3.0
| Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•