0

I have the following two libraries on my site:

  • Wiki Page Library called "Site Pages"
  • Assets Library called "Assets"

When I upload the JPG to the asset library and add the JPG to the wiki page using the "Insert Picture" functionality, the picture is displayed properly the first time. But when I update the JPG afterwards within the asset library, the browser keeps showing the cached version of the JPG file.

How can I force the browser to always retrieve the latest picture from the asset library? Can I control the cache settings of the assets in an asset library?

2 Answers 2

0

The only way I can think of is to put some random number in Query String of the URL of image like:

<img src='/Assets/myPicture?v=1414224214' />

You might need to inject some JavaScript to generate the image URL with random number. Once the browser finds new query string it will reload the image.

1
  • That might work but is not very cool from a usability perspective as changing the query string manually is cumbersome in the WYSIWYG editor. Adding JavaScript is even worse...
    – tschaena
    May 20, 2015 at 19:49
0

Here is a link to some useful info from Stack overflow, it isn't SharePoint specific but may help you out?

https://stackoverflow.com/questions/126772/

Or

https://stackoverflow.com/questions/126772/

Or if this is just your browser/client problem you can hit CTRL + F5 to force refresh on the page. If users haven't seen the original image they will see the new one, but this is really a browser cache problem and not a SharePoint problem.

1
  • Thanks. It would be great if the header of the HTTP get reply would contain the cache control fields for all asset library artifact requests.
    – tschaena
    May 20, 2015 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.