10

What does changing config.assets.version number do?

I understand that the assets expire (as it is written in the comments) but what does it do in the background?

would it delete all the compiled assets? or does it take that version number and uses it somewhere else?

Nick Ginanto
  • 31,090
  • 47
  • 134
  • 244
  • FYI that as of right now this is broken for Sprockets >= v3.0. (The default for new Rails applications). See also [this other stackoverflow question](http://stackoverflow.com/questions/32548755/rails-4-2-rails-application-config-assets-version-doesnt-invalidate-digest-asse) and [this sprockets-rails github issue](https://github.com/rails/sprockets-rails/issues/240). – Jordan Brough Dec 03 '15 at 01:11

1 Answers1

12

It will precompile assets with another fingerprints (the code appendend to the file name), making all the client's browsers download the files again.

In other words, as you said, it expires the caches in the client's browsers.

hsgubert
  • 2,266
  • 1
  • 22
  • 23