Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add favicon to react application browser tab (duplicate)

I am new to react. Could someone help me in adding favicon to react application. I have created favicon package and added generated code to index.html. But I am not knowing how this href to favicon to be specified.

Thanks.

like image 468
sujana Avatar asked Jul 04 '18 12:07

sujana


People also ask

How do I change the icon on my browser tab in react?

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.

How do I add a browser tab icon favicon to my website?

To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".

How do I force the favicon refresh react?

Simply navigate to the address of the favicon. ico file. If this page shows the old icon, just press Ctrl+F5 to refresh without cache. Then reload your original site.


1 Answers

You can add favicon.ico to public/images then enter the index.html and add the code.

<link rel="shortcut icon" href="./images/favicon.ico"> 
like image 65
Araz Babayev Avatar answered Sep 21 '22 18:09

Araz Babayev