-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add fingerprinting to favicons to bust browser caching #823
Conversation
If this change makes sense then I can also update the associated README 👍🏻 |
Honestly, favicons are such a mystery to me. They have their own special rules and you can really go wild with the number of files you seem to have to include. I really wish we could do something simpler. Let's go with the least amount of work solution. Could you do a little research to determine what would be the best combination of effort and benefit? I think fingerprinting them is a good idea. I just don't want a thousand imports for stuff. Also, I know browsers will often look for a |
Ok, after some research, here are some optimisations I believe we can make: Remove
|
I've made changes based on the research above. Let me know if I've missed anything 🙏🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I seriously appreciate the time you spent researching this and contributing back! |
After learning about asset imports and how fingerprints are used to bust the browser cache, I noticed that the epic stack doesn't do this for it's favicons.
This change adds fingerprinting to the favicon file imports in the root so users will always see the latest favicons in their browser.
Notes
favicon-32x32.png
as an alternate favicon, but notfavicon-16x16.png
. Do we need that file?android-chrome-*
favicons are referenced via thesite.webmanifest
file and not imported via the root, so I left them in/public
, along with the default favicon.ico. Is that fine? or should I try to fingerprint these as well somehow?epic-stack/vite.config.ts
Line 18 in 002c436
Test Plan
Checklist
Screenshots