Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using history.pushState in Firefox make my favicon disappear

using something like

history.pushState(null, document.title, "?#");

in my site make my favicon disappear in Firefox, But it works in chrome

Is it a javascript/jQuery way to add favicon when the page is loading?

like image 368
Mosijava Avatar asked Jun 12 '14 13:06

Mosijava


1 Answers

I had similar issue in IE. Whenever I called history.replaceState() favicon disappeared. Favicon was included via link tag like this:

<link rel="shortcut icon" href="/img/resources/favicon.ico" type="image/x-icon">

After I placed favicon.ico to the root folder of my application and removed link, which pointed to it, problem with calling history.replaceState() disappeared. Hope that helps.

like image 68
Serhiy Yehorov Avatar answered Oct 11 '22 14:10

Serhiy Yehorov