javascript_include_tag and stylesheet_link_tag additional generated parameters


I just wonder why do the javascript_include_tag and
stylesheet_link_tag methods generate additional parameters and add
them to the paths on output?

For example, I have the following view:

# app/views/test.haml

    = stylesheet_link_tag 'styles.css'
    = javascript_include_tag 'scripts.js'

and when I load it, I get the next HTML:

    <link href="/stylesheets/styles.css?1276104169" media="screen"
rel="stylesheet" type="text/css" />
    <script src="/javascripts/prototype.js?1275579095" type="text/

What do '1276104169' and '1275579095' mean and why are they added to
the paths?

Any help and links are wellcome.


Debian GNU/Linux 5.0.4;
Ruby 1.9.2;
Rails 2.3.8.

They're the timestamps of when the file was changed. If you do update
the css/javascript files then when you next rollout the timestamp will
be different and people's browsers won't cache the old version


And if you want to get rid of them for some reason just create new initializer with following code:


and restart your server. All this numbers will go away.