What does firefox decide not to cache?

I am viewing network traffic from my rails application using firebug, and I see that css and javascript files are not cached. There are things on the page such as:

<script src="/javascripts/prototype.js?1315256241" type="text/javascript"></script>

and it looks like the value 1315256241 causes FF not to cache the item. But “1315256241” is a “feature” of Rails that was introduced several years ago. Therefore, I am surprised that it does not allow the cache to be cached, but no one asked about it or corrected it.

I asked the same question on the FF forum, and possibly on the Rails forum to no avail. No one seems to understand my question or point of view. So I decided to try it here.

My question is: "Suffix? 1315256241 (request) does not allow FF to cache the page?"

And if so, what do most people in Rails do to prevent this?

0
source share
2 answers

If you look at the documentation for AssetTagHelper and find "Configuring the resource path," you will find this explanation of why the code adds a timestamp along with the necessary changes to my Apache configuration to take advantage of this feature.

Rails . , , (, , , URL-, , , , ).

-, , -, , . Apache:

# Asset Expiration
ExpiresActive On
<FilesMatch "\.(ico|gif|jpe?g|png|js|css)$">
  ExpiresDefault "access plus 1 year"
</FilesMatch>

( ...)

0

, ? ?

, Firefox , , , , . , .

/javascripts/prototype.js?1315256241

/javascripts/prototype.js?1315256242

/javascripts/prototype.js?1315256243

/javascripts/prototype.js?1315256244

..

, . rails dev, , , "Feature".

+1

All Articles