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

On Thu, Sep 4, 2008 at 12:56 AM, Joshua M.
[email protected] wrote:

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?

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

Best,
jeremy

Jeremy K. wrote:

On Thu, Sep 4, 2008 at 12:56 AM, Joshua M.
[email protected] wrote:

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?

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

Best,
jeremy

Thanks, this works a lot better so far. Can you give me a link that
describes what this Env var really does (what’ the theory behind it?),
please? Couldn’t really find a good on myself.

On 04 Sep 2008, at 12:09, Joshua M. wrote:

jeremy

Thanks, this works a lot better so far. Can you give me a link that
describes what this Env var really does (what’ the theory behind it?),
please? Couldn’t really find a good on myself.

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!