3 ms·
History API? Modifying user history should require an exploit, not be offered voluntarily by the browser!
by car_analogy 4y ago
History API? Modifying user history should require an exploit, not be offered voluntarily by the browser!
- munk-a 4y agoI've never liked calling it "History API" it's more focused on modifying what the back button will do. It exists primarily to support SPAs that have hard links for different specific resource views but never actually navigate the user off the single page - the History API allows these sites to drop some breadcumbs so that users can return to different visual states they observed on their screen while never actually navigating.... That all said - I think there are much better ways to accomplish this using, I believe (it's been a bit) location.Url updates that cause micro-reloads... however if your webapp is a 300 pound gorilla this approach is significantly less appealing due to the obvious breaks in user flow.
- usrn 4y agoMan I really hate SPAs. Unless it's something like a drawing app or whatever where the back button doesn't even make sense they're usually awful.
- rootusrootus 4y agoI think the biggest problem with SPAs is trying to put them in a web browser. So many compromises we make just to use a technology that wasn't designed with the idea that you'd build an interactive app on top of it. I don't know the solution, but I wish I could get a normal web, and then have a dedicated generic app sandbox that I can point at a particular app on the 'net.
- ajsnigrutin 4y agoYep... most of the tracking and privacy issues exist, because browser expost too much apis to websites, many of those things not really needed for sites to work properly.
- FrenchDevRemote 4y agoyou can only use your own website history...definitely not an issue imo
- car_analogy 4y agoCan you delete items from it? Even if it's the same domain, that's not something I want a website doing.
- GranPC 4y agoYes. Keep in mind this relates to the back/forward buttons, not your personal history of all visited websites.
- eyelidlessness 4y agoHate to tell you, some form of this has existed for over 20 years. Once there was .back(), it’s been possible to pollute and corrupt browsing history. Even before the hashchange event, it was just a matter of polling the current state to detect history changes. The current API was designed to limit obvious abuse, but obvious abuse was already rampant and already too late to deprecate.