Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:25:06+00:00 2026-05-29T21:25:06+00:00

Compass uses chunky_png to render the sprites. It adds a hash to the end

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:25:07+00:00Added an answer on May 29, 2026 at 9:25 pm

    Unfortunately asset_cache_buster :none option 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:

    # Make a copy of sprites with a name that has no uniqueness of the hash.
    on_sprite_saved do |filename|
      if File.exists?(filename)
        FileUtils.cp filename, filename.gsub(%r{-s[a-z0-9]{10}\.png$}, '.png')
      end
    end
    
    # Replace in stylesheets generated references to sprites
    # by their counterparts without the hash uniqueness.
    on_stylesheet_saved do |filename|
      if File.exists?(filename)
        css = File.read filename
        File.open(filename, 'w+') do |f|
          f << css.gsub(%r{-s[a-z0-9]{10}\.png}, '.png')
        end
      end
    end
    

    Now, uses compass cleanto remove generated files and restarts a compilation with compass compile.
    You obtain, for example, a images/icons-scb1e5456d5.png file and a images/icons.png file. 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a new ruby script using GLI gem that uses Compass within.
Using the searchable plugin in Grails (which uses Compass/Lucene under the hood) we're trying
I am developing an app which uses a accelerometer + compass sensor and I
Is there a way to get compass to generate a sprite sheet from images
I want to install compass by downloading any required file and taking them to
In the Compass screencast at 23:08 Chris Eppstein starts editing a file called config.rb
I've use the compass CSS with blueprint for sometimes. I notice there's a right
I'm using compass and I've got my compass sprites working just fine. The page
when I do: compass compile app/css/libraries/bootstrap/bootstrap.scss it will compile that file to: app/css/libraries/bootstrap/bootstrap.css Is
So I've setup Compass for creating automatic sprites with SCSS . All goes well,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.