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:
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.
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.