You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 9, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 9, 2019. It is now read-only.
Every character press adds a new Browser history entry #41
This completely destroys my browser history. After playing around with this for a bit yesterday, I had to delete literally thousands of browser history entries.
Instead of setting location.href it should use history.replaceState. That way I keep a single history entry that gets updated with the state. Selecting an example could push a new history entry, but all other edit actions shouldn't.
If browsers aren't respecting that then I think you need to stop rewriting the URL on every keypress and instead provide a button that updates the URL. As it is, I cannot use the typescript playground because of how thoroughly it destroys my history; at best I can type up my code into another editor, then copy and paste it into the playground.
Activity
orta commentedon Oct 3, 2019
The TypeScript playground uses replace state, but unfortunately that doesn't actually mean you don't get a destroyed history.
Maybe at some point browser vendors decided to just not respect that? I've tried a few times to figure out what was going on but never found an answer
lilyball commentedon Oct 3, 2019
If browsers aren't respecting that then I think you need to stop rewriting the URL on every keypress and instead provide a button that updates the URL. As it is, I cannot use the typescript playground because of how thoroughly it destroys my history; at best I can type up my code into another editor, then copy and paste it into the playground.