Link to home
Start Free TrialLog in
Avatar of mikha
mikhaFlag for United States of America

asked on

Cache busting technique in asp.net

I have an asp.net project . I want to version the JavaScript files, when there are any new changes to those files , so that browser downloads the latest .

Are there any tools/ nuget packages for this ?
Avatar of David Favor
David Favor
Flag of United States of America image

Simple way I use is the version each file, with a version string...

So say your content starts out using jquery-3.0.0.js then switches to jquery-3.0.1.js any browser will pick up the new version.

This method works so long as you don't cache any html/text MIME types, so text component always downloads to visitors browsers.

Since text downloads should always be <500ms (what I target on my sites) this is the general technique used when versioning of files is used.
ASKER CERTIFIED SOLUTION
Avatar of Stephan
Stephan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial