-
Improvement
-
Resolution: Won't Do
-
Neutral
-
None
-
None
-
-
Empty show more show less
We originally got inspired by the GWT approach of using a .timestamp.cache. pattern. But this has the following disadvantages:
- the filename changes: if one loads js script dynamically one has no clue what the correct pattern would be
- relative CSS resources (for instance background images) are not having a cache friendly filename
Solutions:
A) process the css file and add the timestamp dynamically if needed
+ doable as the files can be freemarker templates (processed CSS)
- how to know the correct modification date? in case the files are in the DMS?
- can be very complex
B) use a path prefix: /cache/timestamp/
+ filename doesn't change
+ relative resources are also cached
- only works for files which share the parent path (relative urls)
- the timestamp is shared. if one changes an image one has to touch the CSS file to change its modification date
- is related to
-
MAGNOLIA-3297 browser caching: make it configurable, support far future caching
- Closed
-
MGNLSTK-714 resources: use modification date to apply the far future caching strategy
- Closed
-
MAGNOLIA-4520 farFutureCaching and Resource files with dot in name cannot be found
- Closed