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

**URL:** <https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653>\
**Category:** Rails\
**Created:** [September 4, 2008, 12:56am UTC](https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653 "2008-09-04T00:56:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [September 4, 2008, 12:56am UTC](https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653/1 "2008-09-04T00:56:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [September 4, 2008, 7:59am UTC](https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653/2 "2008-09-04T07:59:09Z")

</div>

On Thu, Sep 4, 2008 at 12:56 AM, Joshua M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [September 4, 2008, 12:09pm UTC](https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653/3 "2008-09-04T12:09:36Z")

</div>

Jeremy K. wrote:

> On Thu, Sep 4, 2008 at 12:56 AM, Joshua M.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [September 4, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653/4 "2008-09-04T12:33:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [September 4, 2008, 12:36pm UTC](https://www.ruby-forum.com/t/disable-timestamps-scaffold-css-82563531-for-wget/147653/5 "2008-09-04T12:36:46Z")

</div>

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! 🙂 Thanks!
