views:

45

answers:

2

I have a quite long slideshow of images, all rendered via the awesome Paperclip. Those images won't change very often, so I'd like to make use of browser caching. Problem is Paperclip appends a unique load id to the image url. (eg: pancakes.png?1275839986)

Is there any way to prevent this from happening?

Thanks!

A: 

That numeric suffix is stored in the database itself by paperclip and is not unique per page load. It's there for caching reasons, actually.

x1a4
A: 

They're called Asset Tag Helpers http://stackoverflow.com/questions/2852639/rails-passing-additional-params-in-some-tag-helpers/2853007#2853007 You can get rid of them if you want by using:

ENV['RAILS_ASSET_ID'] = ""

In your environment.rb though as x1a4 mentioned they are there for caching reasons. For more info check out the SO link above and this Ruby on Rails doc http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html

ThinkBohemian