I use Ionic to develop a web site for desktop users. Is it possible to change the favicon that we see in the browser? I don’t need to change icon for mobile devices, thank you.
You mean the Favicon that is shown in browser tabs?
Yes, that’s what I mean. I’ve modified my post to specify that.
Yes you can.
The default index.html
in src
contains this code:
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
You can either change the href
or modify the file (in /assets/icon
).
I tried this but it is not working. What I did is changing
href=“assets/icon/favicon.ico”
to
href=“assets/icon/advizeo.ico”
Could it be that the format of my icon file not correct?
I am also confused that, even if I deleted the
< link rel=“icon” type=“image/x-icon” href=“…”>
for the favicon, the favicon still shows up.
Favicons are heavily cached by browser.
(Without that link rel
tag, most browsers default to getting /favicon.ico
)
Have a look at the network panel of your browser’s dev tools, there should be a request to the .ico file.
Sorry for the late response, but I cannot find the request for the “.ico” file in my browser’s (chrome) dev tools.
When you build your app for production go to your www folder and make sure your favi.ico file is in the assets/icons folder and that the index.html file is pointing to that custom file. Must be .ico I used this website to convert png to ico and specifid ico for windows (not website)