Search code examples
internet-explorericonsbasic-authenticationfavicon

In the IE browser, favicon and icons are not displayed in the environment with basic authentication


In the IE browser, favicon and icon font are not displayed in the environment with basic authentication. It is a test environment that uses basic authentication, and there is no problem in a production environment without authentication and other browsers. Also, after authentication, if access each page directly from the URL, the icon is not displayed, but if the page is displayed from a link click, the icon is displayed. (Favicon is not displayed in any case)

about favicon, tried following code.

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

But, nothing changed.

icon font(fontawesome), implements by css content.

I expect that favicon and icon are displayed even in the basic authentication environment.

Thanks for your thoughts.

It is acceptable that favicon is not displayed, so leave it as it is. I ask question separately about icon fonts.


Solution

  • In this scenario, IE will try to load the favicon only once: the first time it hits the web page. But that first request fails because of the authentication requirement (HTTP 401.)

    Once the credentials are given, IE will request the page contents again, but will not try to retrieve the favicon a second time, so nothing shows up.

    If you really have to, you could exclude favicon.ico from basic auth, so that initial attempt will succeed. But some companies have policies that everything in lower environments must be authenticated.

    For testing purposes, you could also try specifying the credentials on the URL when you request the page, using the form https://username:[email protected].