leostera / tldr.jsx

📚 A Reactive web client for tldr-pages
https://tldr.ostera.io
MIT License
1.54k stars 75 forks source link

Browser History is spammed when you search something #157

Open Kreijstal opened 5 years ago

Kreijstal commented 5 years ago
  1. Go to https://tldr.ostera.io/
  2. Search something by typping it
  3. Look at the history log When you search for a command on the web frontend, every keystroke you type is pushed to the browser history so your history is cluttered with every key, you just typed.
sbrl commented 3 years ago

Looks like instead of updating the location object directly, if navigation is done with the Web History API via history.replaceState, that would solve this issue.

sbrl commented 3 years ago

As @mebiem suggests, perhaps a new state could be pushed only when a page is actually found?