material-design-icons-iconfont icon indicating copy to clipboard operation
material-design-icons-iconfont copied to clipboard

Cache busting for the font URL

Open stof opened this issue 6 years ago • 4 comments

To allow defining a long cache header on the font files, it would be great if the reference in the CSS could provide some kind of cache busting, with a query string parameter updated when you update the font file (the query string parameter could use a hash of the file or a version number, depending of what is easier to you).

stof avatar Sep 11 '19 10:09 stof

@jossef any plan to implement this ?

stof avatar Nov 05 '19 12:11 stof

hey @stof great suggestion. any chance you submit a PR?

sorry for the late response

jossef avatar Nov 10 '19 14:11 jossef

I'm not familiar with the way this package is built (I'm only consuming it, bundling the CSS in my project). So I don't know what would be the proper way to implement that cache busting (updating the cache busting param manually when the font is updated is a bad idea IMO, as it is too easy to forget)

stof avatar Nov 12 '19 13:11 stof

I see that the build script already computes a hash of some files to detect changes. This might be used as the cache-busting param, if it is possible to inject it into the scss source (probably using a truncated hash only to be shorter).

However, currently, it seems like this hash accounts only for the list of icons, and so would not cache-bust things if a release is only changing existing icons.

stof avatar Sep 11 '20 12:09 stof