expiring image assets referenced from stylesheets
Posted
by crankharder
on Stack Overflow
See other posts from Stack Overflow
or by crankharder
Published on 2010-06-02T22:02:16Z
Indexed on
2010/06/02
22:04 UTC
Read the original article
Hit count: 177
So rails appends timestamps to CSS, JS and image files:
image_tag 'foo.png' =>
<img src="foo.png?123123123123' /> # or somethin like that
...which is really useful for doing far-future expiration, etc. with Apache's help.
But what about images referenced from stylesheets? They don't get an appended timestamp. So it seems to me that it's entirely possible to update one of those images, redeploy, and then not see the file change because the browser doesn't think it's been updated.
Unless I'm missing something.
If I'm not, is there a decent solution to this problem?
© Stack Overflow or respective owner