Favicon vanishes after using window.history.pushState

Fixed Issue #9383036

Details

Author
Stefan T.
Created
Oct 17, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Found in build #
11
Reports
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

Description
Using window.history.pushState to store state information from the page into the url will result in losing the favicon.

This issue causes alot of well-known applications to ‘lose’ their favicon as soon as the user starts interacting with the page (e.g. maps.google.com when panning). This does not happen in other popular browsers

Steps to reproduce

  1. Create HTML with button to call window.history.pushState with random new url-parameter (Or just use the one provided below)
  2. add link-rel favicon
  3. load the html and click the button

Example page
Sample html: (This html refers to wikipedia so youll need to serve it via a webserver/container)

<!DOCTYPE html>
<html>
    <head>                
        <title>Favicon test</title>
        <link rel="shortcut icon" href="https://en.wikipedia.org/favicon.ico">
        <script type="text/javascript">
         function changeState(){
             var time = new Date().getTime();
             var someState = {param: time};
             window.history.pushState(someState, 'foobar', '?foo='+ time);
         };
        </script>
    </head>
    <body>
        <button onClick="changeState()">push state information</a><br/>
    </body>
</html>

Attachments

0 attachments

    Comments and activity

    • +1. Would be interested too.

    • Interesting

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Status to “Fixed”

    • Thank you for the feedback on IE 11 and Edge.

      I can still repro this in IE 11 on the latest insider fast ring (14951) but not in Edge. I’ll resolve it out as fixed since I am not seeing the same behavior between the two. Please note that we are not working on IE feature bugs any longer unless they are security related.

      All the best,
      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in