开发者

expiring image assets referenced from stylesheets

开发者 https://www.devze.com 2023-01-02 15:02 出处:网络
So rails appends timestamps to CSS, JS and image files: image_tag \'foo.png\' => <img src=\"foo.png?123123123123\' /> # or somethin like that

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 som开发者_如何学运维ething.

If I'm not, is there a decent solution to this problem?

0

精彩评论

暂无评论...
验证码 换一张
取 消