smoosh icon indicating copy to clipboard operation
smoosh copied to clipboard

Append hash to generated file

Open jgallen23 opened this issue 14 years ago • 4 comments

It would be nice to have a hash appended to the generated file so for caching purposes when serving the files for web. The hash would only change if the contents of the file change, so you could, theoretically, put an infinite caching time on all js/css assets.

Thoughts?

jgallen23 avatar Apr 25 '11 17:04 jgallen23

Maybe as an option. Seems like a decent idea.

ded avatar Apr 26 '11 07:04 ded

+1

masylum avatar Jul 16 '11 20:07 masylum

It would be nice if the generated hash was stored in the config file as well so it can be used within an app.

dawnerd avatar Jul 17 '11 18:07 dawnerd

+1 Please take a look at https://github.com/sstephenson/sprockets how they handle hash and storage of hash. It took them a long time to nail it and this is one of the things that are really well done in rails.

The important thing, as dawnerd said, is to create a config file containing the mappings from css name to hashed name, but please don't modify the existing one.

mwawrusch avatar Dec 16 '11 20:12 mwawrusch