Closed Bug 792247 Opened 12 years ago Closed 12 years ago

Generated offline cache manifest needs to use jingo-minify's cache-busting.

Categories

(Marketplace Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
2012-09-27

People

(Reporter: potch, Assigned: kumar)

References

Details

The HTML5 offline cache only uses the cached version of an asset if the URL of the asset in the site exactly matches the URL in the manifest, *including* the querystring. When we minify our assets with jingo-minify, we generate and append cache-busting querystrings to each of our CSS/JS bundles, as well as a unique cache-busting string to every image referenced in our CSS. When we generate our offline manifest at build/deploy time, its entries need to mirror these cache-busted URLs exactly.
Assignee: nobody → kumar.mcmillan
Blocks: 768946
Priority: -- → P1
Is this blocking today's push? I should have asked that yesterday, heh. I am still tied up in payment meetings this week but I can get it done first thing next week. Otherwise I could provide clues for someone else to work on it.
Target Milestone: --- → 2012-09-27
This obviously wasn't blocking release last week :) but it's pretty important for us to have a meaningful (read: working) offline experience.
btw, I have time today to work on this
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Typo, fixed! https://github.com/mozilla/zamboni/commit/67ee206 The appcache manifest file itself is cached for at least 5 minutes so this may be hard to verify on -dev because we update dev a lot. I think the cache ID should be sync on prod since we don't deploy as frequently.
Checking out the source of https://marketplace-dev.allizom.org/ and https://marketplace-dev.allizom.org/appcache/manifest.appcache, I see the <script> tags at the bottom match up nicely hash-wise, but the CSS at the top doesn't match. Additionally, if I start putting the images referenced in our CSS in the cache (icons, etc) will they be given a proper cache-bust string?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Potch [:potch] from comment #6) > I see the > <script> tags at the bottom match up nicely hash-wise, but the CSS at the > top doesn't match. Ah, this required some hacks. Fixed! https://github.com/mozilla/zamboni/commit/76e27206927658f7b144afa09209b6f4f3729a3d https://github.com/mozilla/zamboni/commit/9da027ec12735dcab90c56ed123dadc4823edb61 > > Additionally, if I start putting the images referenced in our CSS in the > cache (icons, etc) will they be given a proper cache-bust string? Do our images have the same build ID in them for cache busting? If you can point me to a URL of one that you want to add to appcache I'll be able to find out how to do it.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.