I think it's strange that a route change would trigger a request for the favicon.
Is this intended or what is going on here?
I had the same problem and I believe the problem started with the Chrome 49.0.2623.87. I hope it is going to be fixed in the coming updates. For now, I am using the script below, which can be found here.
var favIcon = "favicon.ico"; var docHead = document.getElementsByTagName('head')[0]; var newLink = document.createElement('link'); newLink.rel = 'shortcut icon'; newLink.href = 'data:image/png;base64,'+favIcon; docHead.appendChild(newLink);
It will not stop the favicon requests, so for a short period of time you still will see the default favicon from chrome, but I believe there is not much to be done about that.
I found a solution on Github. Quoting @Doeke:
Try reordering the favicon link tags. For me, putting the 16x16 link before 32x32 fixed this issue. As for why this works... I have no idea.
For me, it meant putting the only favicon <link>
on my page right at the top of <head>
, after <meta charset>
.
Try to serve favicon.ico
from your server or add route for that. I was experienced such error when using express catch-all app.get('*')
method which redirected all requests to index.html
(even for favicon)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With