Send some cache headers with addons/buttons.js

VERIFIED FIXED in 5.10

Status

VERIFIED FIXED
9 years ago
3 years ago

People

(Reporter: jbalogh, Assigned: jbalogh)

Tracking

Details

(Whiteboard: [z])

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
We should far-future expire it like normal js, or at least cache it until the next amo release.
(Assignee)

Comment 1

9 years ago
http://github.com/jbalogh/zamboni/commits/878beae
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Looking at the following, https://preview.addons.mozilla.org/z/en-US/firefox/addons/buttons.js?build=2a3ccb1

GET /z/en-US/firefox/addons/buttons.js?build=2a3ccb1 HTTP/1.1
Host: preview.addons.mozilla.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: */*
Accept-Language: en,en-us;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://preview.addons.mozilla.org/z/en-US/firefox/
Cookie: WT_FPC=id=2dcdeefaf4d016b45771272494088283:lv=1272579284309:ss=1272578870819; wtspl=945477; csrftoken=b3d344c7160de1a46acb3e1d1d7333bf; dloadday=63.245.220.240.1272576744348020; amo_home_promo_seen=4
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 200 OK
Server: Apache
X-Backend-Server: pm-app-amo24
Content-Type: text/javascript
Date: Thu, 29 Apr 2010 23:07:45 GMT
Keep-Alive: timeout=5, max=999
Accept-Ranges: bytes
Via: Moz-Cache-zlb05
Content-Length: 2626
Connection: Keep-Alive
X-Cache-Info: cached

I don't see where we're caching this file for a year, as per http://github.com/jbalogh/zamboni/commit/878beaecdcb6f5daa23c5767aeb22aaa7f837484#L0R203
(Assignee)

Comment 3

9 years ago
Thanks Stephen!  If you look at https://preview.addons.mozilla.org/z/en-US/firefox/addons/buttons.js you'll see caching headers.

We don't see it with ?build=xxx because Django's caching mechanisms skip the cache if there are any get params.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 4

9 years ago
http://github.com/jbalogh/zamboni/commit/f7b5cb9635cbeb23d9
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → FIXED
Created attachment 442779 [details]
Post-fix screenshot
Verified FIXED; I've verified that both the regular and ?build= versions of buttons.js have the following:

Expires	Sat, 30 Apr 2011 19:20:21 GMT
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.