Closed Bug 1087399 Opened 10 years ago Closed 10 years ago

Cache communication iframes (potatolytics, iframe-install) for a long time

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2014-11-11

People

(Reporter: mat, Assigned: mat)

References

Details

(Keywords: perf)

The HTML for the 2 communication iframes (potatolytics, iframe-install) is served from our own servers (can't use the CDN, we need the origin) without Expires/Cache-Control. So users have to make a request for them every time they load Marketplace, and those requests can be pretty slow A stable ETag is returned every time, and we correctly return 304s, but we should do better and ask the browser to cache them for a long time, cachebusting them like we do for every other resource (I suggest we use the build id and figure out how to improve it with the rest in bug 985291)
Keywords: perf
Priority: -- → P2
Assignee: nobody → mpillard
Status: NEW → ASSIGNED
Target Milestone: --- → 2014-11-04
Fixed in https://github.com/mozilla/fireplace/commit/34fd480f5273496d1cc8ccf7b46c3e0a8df47e88 STR: - Load Marketplace with developer tools network tab opened, filter to just show "HTML" - If you started with an empty cache you should see 2 requests on marketplace origin (ignore persona): "/" and "iframe-install.html". - Verify that iframe-install.html response contains "Cache-Control: max-age=31536000" - Reload the page, verify that the requests are not made (they are in your browser cache now) and everything still works (try installing at app for instance)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: 2014-11-04 → 2014-11-11
(In reply to Mathieu Pillard [:mat] from comment #1) > Fixed in > https://github.com/mozilla/fireplace/commit/ > 34fd480f5273496d1cc8ccf7b46c3e0a8df47e88 > > STR: > - Load Marketplace with developer tools network tab opened, filter to just > show "HTML" > - If you started with an empty cache you should see 2 requests on > marketplace origin (ignore persona): "/" and "iframe-install.html". > - Verify that iframe-install.html response contains "Cache-Control: > max-age=31536000" > - Reload the page, verify that the requests are not made (they are in your > browser cache now) and everything still works (try installing at app for > instance) I can see "/" after refresh ...should I re-open this bug ?
Flags: needinfo?(mpillard)
No, that's a different bug, but I believe this happens only when you reload using Ctrl+R or the reload button. If you /navigate/ to the homepage again instead, by focusing your browser's location bar and hitting enter, then no new request to / should be made.
Flags: needinfo?(mpillard)
If I am reloading the page via your last method, both "/" and "iframe-install.html" are displayed every time.
Really ? I can't reproduce this on either dev or stage. Can you start over (empty your browser cache first, then go through all the STRs) and submit a screencast ?
Hmm, after clearing the cache and everything I can see that "iframe-install.html" is not displayed anymore after refresh. Regarding "/" request, first time after refresh( by focusing your browser's location bar and hitting enter) I can see it, but subsequent times is not displayed anymore.
You need to log in before you can comment on or make changes to this bug.