Sharepoint stop caching xml or media files

If  you are using sharepoint you noticed that every xml,img or media files are cached automatically. This is good for performance but its so problematic for changes or updates. You change something in your xml at background but users can not see changes because of sharepoint caching .

Solution is so easy

this is your file path:

[your xml url]/myfile.xml
[your img url]/img.jpg

if you change it like this

[your xml url]/myfile.xml?ver=[some number]

[your img url]/img.jpg?ver=[some number]

and after change your xml content generate some random number for [some number] sharepoint relaese caching your media or data files.I am using GUID for this 🙂


About bpostaci
Escalation Engineer in Microsoft.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: