Image references in CSS are no longer the hashed names

RESOLVED FIXED

Status

www.mozilla.org
Bedrock
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: pmac, Unassigned)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [q3 sprint 5])

Attachments

(1 attachment)

Our CSS processor should be altering the CSS to refer to images by their hashed names. e.g. graph-paper-tile.png should be something like graph-paper-tile.deadbeef1234.png. Investigate why this is no longer working and fix it. Using the hashed file names dramatically improves the caching of said images.

Updated

a year ago
Whiteboard: [PBL]

Updated

a year ago
Whiteboard: [PBL] → [q3 sprint 5]
Figured this out:

We're using a script in the repo (docker/bin/softlinkstatic.py) to reduce the size of our docker images. It removes the hashed named files in /static/ and replaces them with a symlink to the original file. This works fine in most cases, but for CSS the content of the hashed files is different in that references to other static files have been replaced with their hashed names. We want those references since the hashed versions of files are served with far-future cache timeout headers and thus reduce our server load.

A PR is forthcoming.

Comment 3

a year ago
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/9b493574eecb75e3f98dd3ab2a86b96713c50bff
Fix bug 1300090: Exempt css files from softlinkstatic.py

The content of the hashed CSS files is different from the
non-hashed versions. In the former the references to other
files (e.g. images) have been changed to their hashed versions.
We want to keep these versions since they are served with far-future
cache headers and thus reduce our server loads.

https://github.com/mozilla/bedrock/commit/08dafbe9e112a861bdee88983bce38ea16115b8e
Merge pull request #4344 from pmac/fix-css-image-name-modification

Fix bug 1300090: Exempt css files from softlinkstatic.py

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.