Favicon not updating after build in Create React App #17056
-
Hello, I’m using Create React App for a small project and I replaced the default favicon in the It shows up correctly in local development ( I made sure to replace the file inside Is there something specific I need to do to force the new favicon to show after deployment? Thanks in advance! pls |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I ran into this same issue a while back, the favicon thing can be surprisingly annoying in CRA. What’s likely happening is that the browser is aggressively caching ur old favicon, especially if u had already visited the site before updating it. Here are a few things u can try:
2 Make sure ur deployment clears old cache 3 Force reload with meta tags (optional) Use Chrome’s DevTools to confirm Once it starts appearing on one browser or device, it usually propagates after a while. It’s frustrating but fairly common in CRA deployments Hope this helps |
Beta Was this translation helpful? Give feedback.
I ran into this same issue a while back, the favicon thing can be surprisingly annoying in CRA.
What’s likely happening is that the browser is aggressively caching ur old favicon, especially if u had already visited the site before updating it.
Here are a few things u can try:
Rename the favicon file entirely
Instead of keeping
favicon.ico
, try naming it something likefavicon-new.ico
and update urpublic/index.html
like this:2 Make sure ur deployment clears old cache
If u're using Netlify, try a “hard” deploy (clear cache & deploy), or trigger a fresh deploy from a clean build.
3 Force reload with meta tags (optional)
Some peop…