Disable timestamps (scaffold.css?82563531) for wget?

Hi all

I'm trying to make a copy of my whole Rails website using wget:

wget -rkpl 5 localhost:3000

Sadly all the references to images, stylesheets, javascripts etc. don't work, I guess because of the timestamps that are appended to every file when linked:

localhost:3000/images/covers/142/ava1cd033_b.jpg?1218812815

just doesn't work locally. How can I disable them so I can get the wget copy to work properly?

Thanks a lot for help. Josh

Set ENV['RAILS_ASSET_ID'] = '' in your environment to disable them by setting the asset id to an empty string.

Best, jeremy

Jeremy Kemper wrote:

Browsers cache images/javascript/stylesheet files. If the url is exactly the same, the browser will use the cached version.

Suppose you have localhost:3000/images/covers/142/ava1cd033_b.jpg and decide to update that ava1cd033_b.jpg, there’s a big chance you won’t see the actual update until you either refresh the whole page (and I mean a real manual refresh) or even clear the browser’s cache. By adding the asset string (which is just a timestamp of the modification datetime of the file), the url will change if the file is updated, but stay the same if the file hasn’t been updated.

Best regards

Peter De Berdt

Peter De Berdt wrote:

Suppose you have localhost:3000/images/covers/142/ava1cd033_b.jpg and decide to update that ava1cd033_b.jpg, there's a big chance you won't see the actual update until you either refresh the whole page (and I mean a real manual refresh) or even clear the browser's cache. By adding the asset string (which is just a timestamp of the modification datetime of the file), the url will change if the file is updated, but stay the same if the file hasn't been updated.

Sounds reasonable! :slight_smile: Thanks!