▲ | withinboredom 2 days ago | |||||||||||||
Are people really reimplementing browser history in JavaScript? Why are people implementing “navigation history”??!! All of this stuff needs to be stored on the server anyway… otherwise how will you get it back on the page when I switch computers or pull it up on my phone. | ||||||||||||||
▲ | fvdessen 2 days ago | parent | next [-] | |||||||||||||
Because app navigation is not linear like the url history. Think of a popup with tabs within a page. There's the navigation within the popup, and the navigation within the page. When you close the popup, you don't want 'back' to bring the popup back, you want it to go to the page before the popup. This is hard to replicate with just urls and server side rendered html. Also you don't want that store server side because there can be multiple parallel tabs and you don't get notified server side when the tab is closed to properly cleanup the associated resources. | ||||||||||||||
| ||||||||||||||
▲ | javcasas 2 days ago | parent | prev | next [-] | |||||||||||||
Scroll positions of lists, toggleable widget status, partial form fills. You say all of that needs to be stored in the server? That is how you make a big server crawl with just 100 users, regardless of the programming language of the backend. | ||||||||||||||
| ||||||||||||||
▲ | joseda-hg 2 days ago | parent | prev [-] | |||||||||||||
Depending of your flavor of SPA framework, Browser History might not work because there's no actual page change Some will manually push a History entry, but not all |