Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Feature request: fingerprint everything, allow excludes #88

Open
buschtoens opened this issue Dec 25, 2015 · 2 comments
Open

Feature request: fingerprint everything, allow excludes #88

buschtoens opened this issue Dec 25, 2015 · 2 comments

Comments

@buschtoens
Copy link

FINGERPRINT ALL THE FILES

Personally, I think it's more useful to fingerprint all files regardless of their extension and only exclude a few. It would be great if that mode was supported by setting extensions: null.

Here's why:

When I deploy my static assets I basically want them cached forever. That's why I configured my CDN (CloudFlare) to instruct the browsers to cache all files from my https://assets.example.com/ domain for 1 year. The problem with this is, that there are some files (like icon fonts) that don't get fingerprinted because of their file extension, but still get these caching rules.

This is problematic when these files are regenerated and change. Because they were not fingerprinted, all browsers retain the old version and don't download the new one.

Of course I could fix this by adding .woff and all other web font output extensions to the extensions array.

However, this is tedious and paves the way for unexpected caching errors. Especially when I introduce additional formats like .svg or .webm, etc.
Whenever I add a new static file format, I'd have to make sure it's on the list.

Therefore my suggestion: Setting extensions: null disables the filtering. This would not break backwards compatibility as far as I can see. I'd make a PR, if you're okay with this. 😃

One step further (but breaking backwards compatibility): fingerprint all files by default, except for some sensible exclusions, like /index.html and /favicon.ico, even though the latter one is debatable. The old behaviour would be opt-in by setting extensions to an array.

Was there a specific reason to not fingerprint all files right away? Performance maybe? If peformance is a problem, we could introduce a new setting maxSize, and files would be filtered based on that.

@rickharrison
Copy link
Collaborator

I'd personally prefer to do something like extensions: ['*'] or something similar.

@shripathee
Copy link

What's the current status on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants