Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cache busting for the font URL #51

Open
stof opened this issue Sep 11, 2019 · 4 comments
Open

Cache busting for the font URL #51

stof opened this issue Sep 11, 2019 · 4 comments

Comments

@stof
Copy link

stof commented Sep 11, 2019

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
Copy link
Author

stof commented Nov 5, 2019

@jossef any plan to implement this ?

@jossef
Copy link
Owner

jossef commented Nov 10, 2019

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

sorry for the late response

@stof
Copy link
Author

stof commented Nov 12, 2019

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
Copy link
Author

stof commented Sep 11, 2020

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants