Closed Bug 1300090 Opened 8 years ago Closed 8 years ago

Image references in CSS are no longer the hashed names

Categories

(www.mozilla.org :: Bedrock, defect)

Production
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmac, Unassigned)

Details

(Whiteboard: [q3 sprint 5])

Attachments

(1 file)

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.
Whiteboard: [PBL]
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.
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
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: