window.onpopstate inappropriately called on back button

Confirmed Issue #14613504 • Assigned to Travis L.


Nov 10, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

The browser back button will inappropriately fire onpopstate on a page that did not do the pushstate.

Given a set of 3 files/pages, 2 (a.html, b.html) of which constitute a Single Page App (SPA) and a 3rd which does not (c.html).

  • a.html
    • Has a link to b.html using HTML5 history API pushstate
  • b.html
    • Has a link to c.html using a traditional link
    • Navigating to b.html directly results in a 302 redirect to c.html
  • c.html
    • Just a static page

When navigating from a.html to b.html via pushstate, a normal back/forward will work between the two and will fire the appropriate onpopstate event. When then navigating to c.html from b.html via the browser back button, Edge appropriately tries to retrieve b.html and follows the redirect to c.html and believes it is one step back in the history (i.e. you can move forward to c.html again or try to go back to a.html). However, when trying to us browser navigation again to go back to a.html, Edge will fire an onpopstate event in c.html, which did not originate the pushstate and thus has no idea how to handle that event. The browser URL is changed to a.html but it does not attempt to retrieve a.html.

Every other major browser’s (Chrome, FF, Safari) latest versions all understand that the redirect to c.html on the first back navigation means that going back again requires a full reload of a.html and operates as expected by the user.

I’ve distilled the problem down to a small reproducible set of files so the problem looks especially contrived, but it’s happening on a real site. In that case b.html is part of a flow where it’s no longer valid after navigating off of the page, but you can still get back to a.html.

I’ve attached the files for you to host (so that you can institute a redirect if b.html is ever retrieved directly) but I’ve also put them on an s3 website at


3 attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

    Changed Assigned To to “Scott L.”

    Changed Assigned To to “travil”

    Changed Status to “Confirmed”

    Changed Assigned To from “travil” to “Travis L.”

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

Sign in