1

I wonder what the best approach is to not have the users having to press CTRL-F5 with every deployment. We don't want cached versions of changed script files to be pending in network components or browsers.

Individually renaming scripts seems like a lot of work, and requires quite some discipline.

Idea: rename the Scripts folder of our MVC application to Scripts[ReleaseNumber] so that the URL for scripts is something like /Scripts[ReleaseNumber]/MyScript.js ?

Is this a good idea? Does anyone have experience with this?

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
AllWorkNoPlay
  • 454
  • 1
  • 4
  • 20
  • possible duplicate of [How to solve problem with javascript files served from cache?](http://stackoverflow.com/questions/3386312/how-to-solve-problem-with-javascript-files-served-from-cache) – Felix Kling Jul 28 '11 at 09:15

1 Answers1

1

I would highly recommend something like squishit:

http://www.codethinked.com/squishit-the-friendly-aspnet-javascript-and-css-squisher

this invalidates the bundles you create whenever updates occur therby removing this issue.

Plus you can install easily with Nuget.

Richard
  • 21,728
  • 13
  • 62
  • 101