Project

General

Profile

Actions

User story #4519

closed

Add caching information to static JS/CSS resources

Added by François ARMAND over 10 years ago. Updated over 7 years ago.

Status:
Released
Priority:
2
Category:
Performance and scalability
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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).


Related issues 4 (0 open4 closed)

Related to Rudder - Bug #4591: Several issues with new display of RulesRejectedVincent MEMBRÉ2014-03-11Actions
Related to Rudder - User story #10366: Add expiration on static resourcesRejectedBenoît PECCATTEActions
Related to Rudder - Bug #10365: Enable gzip compression on text resourcesReleasedBenoît PECCATTEActions
Related to Rudder - Bug #10387: Rudder (svg) logo aren't displayed with chrome ReleasedVincent MEMBRÉActions
Actions #2

Updated by François ARMAND over 10 years ago

Thanks, actually that was one of our reference ;)

Actions #3

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

Actions #4

Updated by François ARMAND over 10 years ago

  • Description updated (diff)
Actions #5

Updated by Vincent MEMBRÉ over 10 years ago

  • Target version changed from 2.10.0~beta1 to 2.10.0
Actions #6

Updated by Vincent MEMBRÉ over 10 years ago

  • Target version changed from 2.10.0 to 2.11.0~beta1
Actions #7

Updated by Jonathan CLARKE over 10 years ago

  • Target version changed from 2.11.0~beta1 to 140
Actions #8

Updated by Matthieu CERDA about 10 years ago

  • Target version changed from 140 to 3.0.0~beta1
Actions #9

Updated by Jonathan CLARKE almost 10 years ago

  • Target version changed from 3.0.0~beta1 to 3.1.0~beta1
Actions #10

Updated by Benoît PECCATTE over 9 years ago

  • Status changed from 8 to New
Actions #11

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 3.1.0~beta1 to 3.1.0~rc1
Actions #12

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 3.1.0~rc1 to 3.1.0
Actions #13

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 3.1.0 to 3.1.1
Actions #14

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 3.1.1 to 3.1.2
Actions #15

Updated by Jonathan CLARKE over 9 years ago

  • Target version changed from 3.1.2 to Ideas (not version specific)
Actions #16

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/

Actions #17

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 ?

Actions #18

Updated by François ARMAND over 7 years ago

Actions #19

Updated by François ARMAND over 7 years ago

  • Related to Bug #10365: Enable gzip compression on text resources added
Actions #20

Updated by François ARMAND over 7 years ago

  • Target version changed from Ideas (not version specific) to 4.1.0
Actions #21

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
Actions #22

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
Actions #23

Updated by François ARMAND over 7 years ago

  • Status changed from Pending technical review to Pending release
Actions #24

Updated by François ARMAND over 7 years ago

  • Related to Bug #10387: Rudder (svg) logo aren't displayed with chrome added
Actions #25

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
Actions #26

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.

Actions

Also available in: Atom PDF