User story #4519
closedAdd caching information to static JS/CSS resources
Added by François ARMAND over 10 years ago. Updated over 7 years ago.
Description
We don't use any best practice about our CSS/JS file regarding performance: no minising, compactation, Apache cache, or other standard technique.
List what is needed in children ticket and do it.
Among the other things, we will need to take care of CSS and JS versionning so that caching works as expected (i.e: browser don't serve cache information when it should reload them).
Updated by Christophe Nowicki over 10 years ago
My I suggest : http://developer.yahoo.com/performance/rules.html ;-)
Updated by François ARMAND over 10 years ago
Thanks, actually that was one of our reference ;)
Updated by François ARMAND over 10 years ago
- Assignee set to Vincent MEMBRÉ
Along with the minification of CSS and to be able to cache them effectively, we need to versionned them to avoid things like: #4591
Updated by Vincent MEMBRÉ over 10 years ago
- Target version changed from 2.10.0~beta1 to 2.10.0
Updated by Vincent MEMBRÉ over 10 years ago
- Target version changed from 2.10.0 to 2.11.0~beta1
Updated by Jonathan CLARKE over 10 years ago
- Target version changed from 2.11.0~beta1 to 140
Updated by Matthieu CERDA about 10 years ago
- Target version changed from 140 to 3.0.0~beta1
Updated by Jonathan CLARKE almost 10 years ago
- Target version changed from 3.0.0~beta1 to 3.1.0~beta1
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0~beta1 to 3.1.0~rc1
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0~rc1 to 3.1.0
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0 to 3.1.1
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.1 to 3.1.2
Updated by Jonathan CLARKE over 9 years ago
- Target version changed from 3.1.2 to Ideas (not version specific)
Updated by Nicolas CHARLES over 8 years ago
We could add the version number in the js file, by takeing the version defined in the pom.xml
ref: http://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code
ref: https://blog.akquinet.de/2011/02/11/mavenizing-javascript-projects/
Updated by François ARMAND over 8 years ago
Some more information:
- if we use something maven-related, we will need to translate it for each non-maven project with CSS/Js. For now, at least ncf, but perhaps other in the future ;
- we already have a "post process" done on release, that change the Rudder version displayed in the footer by the actual version. We can not reuse it as it is implemented, because it uses a very specific and non portable (and hacky) regex to change it.
All in all, I think we should:
- impose the best practice to add version in parameter of js/css resources, whatever the mean to reach that goal actually used;
- let each project with js/css resources manage the way the version change and is versionned, because it is the best to know if cache should be invalidated or not (typically, I suspect that there is case where we don't need/want to change it on some minor version of Rudder, and we almost always want to change it when coding css/js)
What do you thing ?
Updated by François ARMAND over 7 years ago
- Related to User story #10366: Add expiration on static resources added
Updated by François ARMAND over 7 years ago
- Related to Bug #10365: Enable gzip compression on text resources added
Updated by François ARMAND over 7 years ago
- Target version changed from Ideas (not version specific) to 4.1.0
Updated by François ARMAND over 7 years ago
- Status changed from New to In progress
- Assignee changed from Vincent MEMBRÉ to François ARMAND
Updated by François ARMAND over 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1568
Updated by François ARMAND over 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|990c13c18d56f473d86aaa51639dd61ca3a90ffe.
Updated by François ARMAND over 7 years ago
- Related to Bug #10387: Rudder (svg) logo aren't displayed with chrome added
Updated by Alexis Mousset over 7 years ago
- Subject changed from Make static JS/CSS resources load faster to Add caching information to static JS/CSS resources
Updated by Benoît PECCATTE over 7 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.0 which was released today.
- 4.1.0: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/