[SalesForce] static resource cache old image

I have css file in static resources which refer to Images folder(.zip) to apply images to css classes.
The gotcha is when i replace some images from images folder, on page it still showing older image.
Afterwards, i overriden css on the page only where I refred image using urlfor shows the new image.

background-image:url({!URLFOR($Resource.images,'icon_close_error.gif')}) !important;

Is there any way to solve this image cache problem?

Best Answer

Static resource content does not support any Visualforce-style substitution such as {!URLFOR...}. If you check in your browser, you'll see that text un-replaced in the CSS file and that your page is obtaining the images from some other styling declaration.

One solution is to move that part of the CSS into a Visualforce page.