4 ms·
The History API is super useful, not sure why you don't like it. For ex: I can load some data from API, update the url with History API, then if the user refres
by welder 4y ago
The History API is super useful, not sure why you don't like it. For ex: I can load some data from API, update the url with History API, then if the user refreshes the page they get the correct url but I just saved them a ton of bandwidth and time by not having to refresh the whole page.
- pfoof 4y agoit'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.