We are currently in the wild throes of a migration from SP 2007 to SP 2010. I'm attempting to move some custom JavaScript Validation from the current production site to our staging site.

My validations are maintained in a "Validation.html" file which itself accesses several ".JS" files via HTML script tags. The validation file is included in the "add" and "edit" forms for my list. All of these files are maintained in a library on the team site (not that it matters, but "Source").

I can change the validation (.HTML) file and save it and have those changes represented immediately. However changes to the JavaScript (.JS) files never take and the first version uploaded is always delivered.

This is NOT a client-side cache issue. Examination with Fiddler, multiple browsers, tests on machines that had never visited the staging site and even a direct telnet and manual "get" outside a browser show that the server is distributing the old file. I can view the files in the library and see the correct size and update date/time but downloading the file results in the old files (with different sizes and update times).

I've also tried appending nonsense CGI parameters ("file.js?version=bahblah") and deleting then reuploading the files. Things do work, of course, if I change the name of the file - but additional changes require different names.

We're a (very) large enterprise and have severe limitations on Team Site control:

  • I cannot access server or admin settings AT ALL.
  • There is no capability to access or install Designer.
  • I'm limited soley to the out-of-the-box web interface (which is why I'm building elaborate scripts solutions for something easily done in Designer in the first place).
  • Although enabled in our current 2007 environment WebDAV is disabled (very annoyingly) in the new environment.

So, my question is two-fold:

1) Is there any method I can use to force the server-side cache(s?) to update when I upload a new version?

2) If there are no options for me from my end, is there a suggestion for our admins? Something to set or implement that would update the cache(s) when files are changed?

Obviously this makes development on the site vary from infuriately tedious to utterly hopeless. (With all the limitations it wasn't all that much fun to begin with...)

Thanks in advance.

4 Answers 4


Discovered the answer to my own question. If Script (or CSS) files are kept in normal libraries they will get cached internally to SP and only rarely updated. However if these are files are maintained in the "Style Library" (a built in library created by SP) they will NOT be cached and will update normally.

It's easy enough, once this known, to create your own set of folders within the Style Library and manage your scripts from there.

  • I know its old answer, but if your memory serves well (actually, exceptionally well), do you know if CSS form master page gallery gets cached? or which libraries are automatically cached if CSS/js added.
    – Rohit
    Sep 16, 2015 at 8:54

Most probably it's an issue of the file getting stuck in one of the server's caches.

Is the BLOB caching enabled on the server? If yes, you can try clearing it.

Are Publishing Features enabled on the server? If yes, make sure that you have reset the Page Output Cache and the Object Cache also.

  • I'm sure that the files are getting stuck in the cache (this is all files with a JS extension - not just one). As noted, I have no admin access to the server at all. My hope is to find some method/mechanism by which I (having no admin access) can force the file to refresh. While I can open a request to clear the cache I wouldn't be able to do this for every change (and even if I could it would likely take 24 hours to respond to the request anyway).
    – Jim Davis
    Oct 10, 2012 at 22:14
  • do you have developer access? Can you deploy farm level solutions? Oct 11, 2012 at 4:08
  • NO. No admin. No developer. No nothin'. I have "Admin" role for MY SITE ONLY but even that is curtailed to eliminate access to any shared resources such as templates. As I said: Out of the box web interface ONLY.
    – Jim Davis
    Oct 11, 2012 at 12:44
  • In my case clearing the cache using PowerShell didn't help and after that I had to delete stuck file from the blobcache folder by hand
    – MikhailSP
    May 15, 2015 at 12:04

just to give some thoughts

In your .html page, in the js refference section, change from yourscript.js to yourscript.js?2012.11.26 see if that helps.

If it works, then you can try to dynamicly attach a paramater.


I don't think 'Style Library' is exempted from Blob cache. Caching of .js/.css files happens in all libraries.

I think only solution is Flushing Blob cache using Powershell. If publishing, can check if object cache/output cache is enabled.

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.