3 ms·
it's not about history API being bad, it's about misuse to push the same url 1000 times onto the stack to the back button doesn't work
by pfoof 4y ago
it's not about history API being bad, it's about misuse to push the same url 1000 times onto the stack to the back button doesn't work
- welder 4y agoI've never seen that done, sounds like a bug in the website because there's not reason to do that. It's also an easy fix: close the tab and don't use websites that do that.
- welder 4y agoYou can choose to update the history stack or not. For example, this page uses the History API to update the url without changing the browser history stack: https://wakatime.com/pricing https://wakatime.com/pricing Click the toggle to show yearly pricing and the url is updated, but you can still press back to go to whatever previous page you visited. Then, this page DOES update the history stack when the url changes: https://wakatime.com/dashboard https://wakatime.com/dashboard Click the date range and select a new range, notice the url changes but also you can press back to go to your previous date range.
- postdb 4y agoIt breaks the expectations user have about browser. It is very snaky way to try to make a browser what it is not, all in the name of making SPA just to make a trend. It is one of thing most annoying about the IT industry, that it is a more about fashion then about tech.