Closed
Bug 783851
Opened 12 years ago
Closed 12 years ago
Put Expires & Cache-control headers on our css/js pages
Categories
(developer.mozilla.org Graveyard :: Editing, defect, P2)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: teoli, Unassigned)
References
Details
The following css pages are loaded from each page:
mdn-min.css?build=dcfe923
wiki-min.css?build=dcfe923
wiki-print-min.css?build=dcfe923
They are "revved" with the dcfe923 build id. That means that each time one of them change, they have a different URL. In other words, each URL has a content that *never* change.
Right now, each page load make a CONDITIONAL GET to get them, always resulting in a 304 NOT MODIFIED. By putting an expiration date (w/ Expires: and Cache-control: HTTP headers) in the far future (1 year, or 10 year) we will save these 3 requests.
This will speed our primed cache page load as layout calculation only starts once the css are loaded.
Reporter | ||
Comment 1•12 years ago
|
||
Once revved (see 783852), mdn-print.css should be added to that list.
Reporter | ||
Comment 2•12 years ago
|
||
And the same can be done to our js pages:
https://developer.mozilla.org/media/js/mdn-min.js?build=dcfe923
https://developer.mozilla.org/media/js/wiki-min.js?build=dcfe923
Summary: Put Expires & Cache-control headers on our css pages → Put Expires & Cache-control headers on our css/js pages
Reporter | ||
Comment 3•12 years ago
|
||
And on:
https://developer.mozilla.org/en-US/jsi18n/build:dcfe923 which also is a js script.
Reporter | ||
Comment 4•12 years ago
|
||
As you put (great idea!) the async html attribute on all external scripts (that are the longest to load and blocking further parsing), this is now blocking a win of 0.4-0.6s load time on a _primed_ cache, which is about 10-18% of the total loading times on 95% of the wiki pages.
Especially as in modern servers the persistent connections are limited to 5s max, meaning that we reestablish the 6-10 https connections just to get 304 Not Modified answers…
( Template:CustomCSS need to be fixed too to see the net win)
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Updated•12 years ago
|
Version: Kuma → unspecified
Assignee | ||
Updated•12 years ago
|
Component: Docs Platform → Editing
Reporter | ||
Comment 5•12 years ago
|
||
This has been fixed when we migrated to a CDN.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Updated•5 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•