Strange parameters added to image and CSS URLs

Hi,

I was checking in my Apache log file to make sure that all static
content was being served from Apache and all dynamic content by my
cluster of mongrels when I noticed something odd.

On the whole it worked as I expected, but I notice that certain
resources where being re requested each time - JavaScript files and
some image files get appended with something like ?1168748293. Almost
every other image appears without the parameter, and thus gets shown
from the cache.

created by…
<%= javascript_include_tag :defaults %>

Manager_20

created by …
<%= image_tag “manager_20.png”, {:style => ‘vertical-align: top;’} %>

How can I stop this additional parameter appearing?

Martin

I was checking in my Apache log file to make sure that all static
content was being served from Apache and all dynamic content by my
cluster of mongrels when I noticed something odd.

On the whole it worked as I expected, but I notice that certain
resources where being re requested each time - JavaScript files and
some image files get appended with something like ?1168748293. Almost
every other image appears without the parameter, and thus gets shown
from the cache.

Rails appends the files timestamp to all css/js/images to help browsers
stay current when they change. If you dont’ want this I’m sure you can
disable it somewhere, but I’m not sure of the settings.

There are also plugins to move that timestamp into the url path itself
so
your caching won’t see the “?” which is probably what it is choking on.

-philip

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs