Skip to content
This repository was archived by the owner on Dec 9, 2019. It is now read-only.
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

Open

Description

@lilyball

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.

Activity

  1. orta commented on Oct 3, 2019

    @orta

    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

  2. lilyball commented on Oct 3, 2019

    @lilyball
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions