Compass uses chunky_png to render the sprites. It adds a hash to the end of the file to force caches to download the new image sprites. Is there a way to turn this cache busting off?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately
asset_cache_buster :noneoption does not disable adding the hash to the end of the filename.Like I wrote few time ago (in french), Compass has no way to disable the cache hash buster, but I propose a solution.
In your configuration file (eg
config.rb) add the following lines:Now, uses
compass cleanto remove generated files and restarts a compilation withcompass compile.You obtain, for example, a
images/icons-scb1e5456d5.pngfile and aimages/icons.pngfile. In the stylesheets, all references to the sprites now point to the version without hash.Be sure to keep the file has a hash provided to optimize compile times by Compass.