Skip to content

Favicon not updating after build in Create React App #17056

Answered by weyniis
Codex1ntech asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. Rename the favicon file entirely
    Instead of keeping favicon.ico, try naming it something like favicon-new.ico and update ur public/index.html like this:

    <link rel="icon" href="%PUBLIC_URL%/favicon-new.ico" />

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Codex1ntech
Comment options

Answer selected by Codex1ntech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants