In Rails, when serving static files, you get asset IDadded to the URL, for example
<script src="/javascripts/application.js?1300371955" ...
<link href="/stylesheets/custom.css?1299690788" ...
Thus, the URL of the static file changes if the timestamp of the files changes, and browsers automatically request a new file.
I saw that using helper methods to include static assets --- stylesheet_link_tag, javascript_include_tagand image_tag--- Rails automatically adds timestamps to all links to these files.
How can I implement something similar for other assets that do not have such helper methods
, such as .swffiles?
(This "strategy" has to make the reload have a name, if so, what is called?)
source
share