Hacker News new | past | comments | ask | show | jobs | submit login

For all your examples I can think of a reason to update the url in some or most scenarios. It depends.

New blog comment can be part of the url target with the comment id. Makes it easy to share and puts the scroll bar at the right position.

Menu navigation can be quite complex with nested modals, you might want to be able to deeplink for documentation/training purposes and highlight a selection.

With a cart you might want to add a ‘cart state/session’ id so you can share it with your spouse to quickly get to an agreement about stuff to order.




> With a cart you might want to add a ‘cart state/session’ id so you can share it

That might not work for carts that work by temporarily 'booking' an item, like a seat for a cinema ticket. By definition, the cart is unique to a user.


My local cinema actually allows this but the cart-session is tied to the user session so when you share it the page goes to readonly mode where only the time and chosen seats are visible.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: