Why is SharePoint not showing latest version of GIF?

I'm using a VBA script in Excel to export and upload a diagram to SharePoint. This happens twice a day, which means I'm going to check for existing files, delete them and upload the new version of it. The filename is exactly the same.

When the upload is complete the time stamp in the SharePoint library changes and the file is flagged as "new". However if I click my GIF to watch a preview in my browser there's still the old version of the file (which was deleted previously). I tried to delete browser cache but that didn't help. I tested this with IE and Google Chrome.

Now it's getting strange. If I download a copy of my GIF file and open it, it's the correct version!

I've googled a lot and I have no idea what the issue could be. I'm quite new to SharePoint and I would appreciate possible solutions to this. Thank you in advance!

  • Check if the file is checked in and published
    – Gaurravs
    Dec 16, 2016 at 11:47

2 Answers 2


Seems to be Cache issue from TMG, can try verifying this by adding a query string parameter to your GIF url.

For e.g https://www.contoso.com/sites/me/photo.gif?rev=1.0

  • it seems that this is the case. Is there a way to permanently fix it?
    – mabu
    Dec 16, 2016 at 13:43
  • Not sure for a permanent fix, but in my pages i append random number by javascript var Random = Math.random(); var gifUrl = '/sites/me/photo.gif?r=' + Random; Dec 17, 2016 at 4:45

Restart the timer job of the server. It surely a Cache issue and nothing else. Try the below link for clearing the SharePoint cache:


  • More likely browser-cache than timer job cache Dec 16, 2016 at 12:44
  • @RobertLindgren I don't think that it is browser cache. I completely deleted browser cache and even tried different browsers too.
    – mabu
    Dec 16, 2016 at 13:44
  • Do you use blob-cache? @mabu Dec 16, 2016 at 14:31
  • Yes, blob-cache is enabled. Since I have no influence on this settings I'm looking for another solution to by-pass this or something similar. I found out if I add ?rev=sometext to my URL I'm getting the latest version of my file. But it works only once. Is there a way to pass a value like datetime to the URL? Like that I could by-pass the cache right?
    – mabu
    Dec 16, 2016 at 14:41

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.