1

I am trying to figure out how other web developers deal with with the issue of older cached versions of JS and CSS files when deploying new versions of a web application.

If I don't change the names of these files, then users might see weird behavior if they get a cached older version of the JS or CSS. I could update the filenames with a version number manually, but that would make checking the file's history in version control messy.

I feel like the perfect system would be the IDE/build system (I'm using NetBeans) automatically adding a datetime string to these filenames, e.g. renaming style.css to style.201503131432.css, when the WAR file is built although then of course all references to the file (e.g. in JSP files importing them) would have to be updated automatically as well. I expected to find a NetBeans plugin to do something like this, but I haven't been able to.

Am I totally off-base with how other developers handle this problem?

Phil
  • 11
  • 1
  • 1
    See [this question](http://stackoverflow.com/questions/118884/what-is-an-elegant-way-to-force-browsers-to-reload-cached-css-js-files) for how to force browsers to load the fresh version. – Jonas Czech Mar 13 '15 at 18:45

0 Answers0