Input buffer locked due to Location/History API throttling
Description
Changes to the input buffer fail when exceeding the browser's Location/History API rate limits.
tree.nathanfriend.com serializes the app state in the URL as a query parameter. Whenever this state changes (i.e. when rendering options + the input buffer change), the URL is updated with the new state.
Here's an example from just typing asdf repeatedly.
Environment
-
tree.nathanfriend.comcommit -
Operating system
- Linux (NixOS)
-
Browser
- Firefox 134.0.1
Potential Fix
Default the app to stop persisting state in the URL and only store it in localStorage.
Only the Share button should create a URL with the state serialized as a query parameter.
If a new instance of the app is opened with the query parameter populated:
- Read + validate the state from the query parameter into memory.
- Remove the state from the URL (i.e. update location to
https://tree.nathanfriend.com). - Load the state into
localStorage.- Provide a confirmation prompt if this will replace existing non-equal state.
Edited by Kevin Su
