PolymerElements / iron-location

A Polymer element that manages binding to the page's URL.
22 stars 41 forks source link

Instant redirects when the element wakes up shouldn't flood history #38

Closed rictic closed 8 years ago

rictic commented 8 years ago

As a user of a site built with iron-location, when the site redirects automatically and immediately after I initially navigate to it, I don't want any extra entries in my history, and I definitely want the back button to take me to the previous site I was on, rather than taking me back to a page that will then instantly navigate me forward again.

We should be able to do this pretty simply by just giving _lastChangedAt a better initial value, such that any navigations in the first 200ms or so will call replaceState rather than pushState.