Search code examples
internet-exploreripv6favicon

IE 11 doesn't show favicon when accessing the sever through ipv6 address


I used express as my local server to test my web application. Everything was OK when i accessed the server using ipv4 address(localhost:8000) in IE 11 browser. However, when i accessed the server using ipv6 address([::1]:8000), everything worked well except IE didn't show favicon.

I checked the log information in debug mode in IE and found that IE didn't send request to require the favicon(confirm in express console that server didn't receive the request of requiring the favicon).

PS:I tried to access the icon directly using http://[::1]:8000/favicon.ico. It was OK.


Solution

  • It seems that it is because of IE bug. see link: https://connect.microsoft.com/IE/feedback/details/961284/favicon-not-displayed-on-ipv6-literal-hostnames

    NOTE: localhost:8000 will use IPv6 by default, not IPv4.

    Make sure you have following code in <head>.
    <link href="/favicon.ico" rel="shortcut icon">
    If you use IP address directly, IE will not try to access /favicon.ico.