70

I already remove the link in the head tag and still the favicon gets rendered, is there anyway this can be remove or change?

null
  • 1,062
  • 1
  • 9
  • 21

14 Answers14

91

Your favicon is in project_root > public > favicon.ico.

|
`--- public
     |
     `--- favicon.ico

Removing it is hard as browser generally uses a cached favicon if it doesn't find anything.

I'd urge you to change it. Just replace the favicon.ico file with an image of your choice. You can even rename a png to favicon.ico and use it. Make sure you do a hard refresh. You have to burst cache to see that change.

If you want to go all in on this, generate a favicon using https://www.favicon-generator.org/

David Kamer
  • 2,677
  • 2
  • 19
  • 29
sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
  • 12
    Can you be more specific on what a "hard refresh" is? – rodrigocfd Aug 17 '18 at 02:06
  • 10
    It's just refreshing the page with clearing cache. You can do it with ctrl-f5 in pc or cmd-shift-R in mac https://www.getfilecloud.com/blog/2015/03/tech-tip-how-to-do-hard-refresh-in-browsers/#.W3ZP15MzbrQ – sudo bangbang Aug 17 '18 at 04:34
  • How to burst cache? – MadHatter Jun 01 '20 at 05:00
  • 2
    @MadHatter, do a [hard refresh](https://www.getfilecloud.com/blog/2015/03/tech-tip-how-to-do-hard-refresh-in-browsers/) – sudo bangbang Jun 02 '20 at 08:17
  • In my case I tried all the above but still it still wasn't working, so for me the hard refresh was to kill the terminal and start again and it worked. – Affy Aug 13 '20 at 18:19
  • Clearing cache is not removing it! @sudo – Akhila Aug 13 '20 at 19:54
  • 1
    The editor or server doesn't have much to do with it. The icon is cached in the browser – sudo bangbang Oct 10 '20 at 15:52
  • 1
    @rodrigocfd if you have dev tools open you can right click the refresh button and you will see 3 options, normal reload, hard reload, and empty cache and hard reload, which will delete your cached images ;) – AnaCS Jun 16 '21 at 10:22
16

Try this:-

Change <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> to

<link rel="shortcut icon" href="/a.png" /> which should be not present by the way or try deleting the favicon 
Rajat Rao
  • 191
  • 1
  • 10
11

You have to do all the above (or below), but you also need to clear your browsing history.

gajo357
  • 958
  • 12
  • 22
7

Go to directory of your project → public → open manifest.json:

  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    }
double-beep
  • 5,031
  • 17
  • 33
  • 41
6

You can change it from the public directory with your own favicon and but you'll see while developemnt but when you run

npm run build

you won't see it in the index.html link tag you'll only see it on the development .

mostafa tourad
  • 4,308
  • 1
  • 12
  • 21
5

just simply rename your image to favicon.ico and replace the actual favicon.ico image in public-folder by your renamed-image. and then just refresh you page..

Ajay jangid
  • 711
  • 9
  • 9
4

You may have to generate the flavicon. After you decide on an image that you want to use for the flavicon, this site will help you generate the .ico file. You may have to edit the HTML to include the correct resizing properties.

https://realfavicongenerator.net/

4

Just Navigate to public Folder in your react project and then remove the file named favicon.ico. Then after you should replace that file with your favorite icon or any png image by renaming it as favicon.ico like the one you had before. then refresh your page.

1

get your icon and replace it with ~your_director~/public/favicon.ico

then refresh site.

Kasun Hasanga
  • 1,626
  • 4
  • 15
  • 35
1

Just replace your project_folder/public/favicon.io with your icon. You can just rename your .png or .jpeg file to favicon.io, it just works.

Arun Nayak
  • 11
  • 2
0

Go to index.html file. After that remove the default href value () from it and simply replace your icon source here.

0

download icon file and place it in public folder rename it favicon after renaming open in any editor and open that file and then refresh

0

Fast changes without deleting Browser cache or history : Ctrl+F5

0

Just delete the favicon.ico , move any image in public folder and rename in favicon.ico ....worked for me

xcrx news
  • 51
  • 3