3 ms·
That’s because they implemented the link using history.pushState (default non-js link behaviour) when history.replaceState should be used instead. It might sti
by graftak 4y ago
That’s because they implemented the link using history.pushState (default non-js link behaviour) when history.replaceState should be used instead.
It might still be valid to use a link for an on-page modal, for instance when it needs to be navigationable or should persist on a refresh.
- hn_throwaway_99 4y ago> (default non-js link behaviour) I mean, that's pretty much my whole point. Forget javascript (as the example in the article does), but links by default append to the state, because that is pretty much how browsers always worked before they even exposed the history API to javascript.