Flush Away Old CSS, JS after SharePoint Deployment


It is very usual that after the deployment to SharePoint farm, the web site continues to show old CSS styles and run old JavaScript code.

Well the CSS, JS are also cached at the browser, we can work around this by introducing the incremental revision parameter to JS, CSS references i.e. ?rev=1.


Server caching

To clear the server caching, perform IISReset on each SharePoint server in the farm.

Browser caching

  1. In Internet Explorer, clear the cache and browser history.
  2. In Chrome:

    1. Press F12
    2. Right click on Refresh button
    3. Select "Empty cache and hard reload"


The caching also happens at the server side (mostly WFE). The simple PowerShell can help you clear the WFE caching.