Defect #29625

application.css imported by themes not covered by cache control versioning

Added by T Goeg almost 2 years ago. Updated over 1 year ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Themes
Target version:-
Resolution: Affected version:3.4.6

Description

The subject and #24617-12 pretty much says it all.

After an update, the old application.css still gets used by browsers' caches, with no means other than renaming the file and its import statements in the used theme to force cache invalidation.

Partial workaround:
public/themes/<activetheme>/stylesheets/application.css

Change import statement
@import url(../../../stylesheets/application.css);

to some other name (e.g. application_v2.css)

Rename public/stylesheets/application.css to e.g. application_v2.css

Also apply the cache control hack in the mentioned ticket.

However, you can still never go back to application.css as browsers will still keep it cached forever. A fix is needed that makes the filename unique on every update, much like all other resources.
This may also affect other resources delivered by themes (e.g. images), so a best practice should be given for how to avoid that as well.


Related issues

Related to Redmine - Defect #24617: Browser js/css cache remains after upgrade Closed

History

#1 Updated by Go MAEDA almost 2 years ago

  • Subject changed from application.css not covered by cache control versioning to application.css imported by themes not covered by cache control versioning
  • Category set to Themes

#2 Updated by Go MAEDA almost 2 years ago

  • Related to Defect #24617: Browser js/css cache remains after upgrade added

#3 Updated by Yuuki NARA over 1 year ago

+1

I think this information should be known more.

Also available in: Atom PDF