[MGNLIMG-103] Set a header on responses instructing the browser not to cache. Created: 05/Dec/12  Updated: 02/Apr/13  Resolved: 05/Dec/12

Status: Closed
Project: Imaging
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0

Type: Task Priority: Blocker
Reporter: Christopher Zimmermann Assignee: Christopher Zimmermann
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLUI-346 Assets App: All instances of an image... Closed
is depended upon by MGNLSTK-1063 InternalAssetVariation should add a f... Closed
relation
is related to MGNLUI-340 Images and assets should be cached on... Closed
is related to MGNLIMG-105 Ensure that images are set to cache i... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

This is a "quick fix" so that images will be updated in the admin interface and on the website pages after they have been altered. It is possible to replace an image with a new image, or to edit an image via cropping or another transformation - and currently these changes are not visible because the browser has the old version of the image cached.

After minimal investigation I think the header is:
Cache-Control: no-cache

The plan is then as a next step to always append a date (or date derived key) as a querystring to images of its modification date, so that versions of the image can be cached by browser and proxies.



 Comments   
Comment by Christopher Zimmermann [ 05/Dec/12 ]

When this one is fixed, then 32 will be fixed once the images are refreshed on the browser, ie via a page reload.

Comment by Christopher Zimmermann [ 05/Dec/12 ]

Added setHeader commands to ImagingServlet.doGet().

On reflection this may be overkill, and also the planned strategy of adding dates to the query string. The reason is that by current design you CANNOT edit an asset that is in use on the website. So really we just need to make sure that the images/assets are not cached in the admin interface. So we could just add cachebuster querystrings on uses in the admin interface.
On the other hand, in the future it may become allowed to edit assets that are in use.

Comment by Tobias Mattsson [ 11/Dec/12 ]

Closed, this is a temporary fix and MGNLUI-340 will provide the real solution.

Comment by Christopher Zimmermann [ 03/Jan/13 ]

This implements the cache fingerprint in the STK.

Generated at Mon Feb 12 02:12:18 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.