Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If the site wasn't working it wouldn't break, it would download each page when you hit the back button. That would actually be a welcome result if I hit the refresh button wanting to make sure I was only looking at fresh data.


Any resource (ie page/URL) should function correctly with no regard to how that resource was loaded. That's the contract any server has with the client (browser), with no regard to what technology is being used to deliver the resource.

If a website or application basically has to do the 2024 equivalent of "don't hold it that way", it's the result of a broken development model.


The correct function comes down to what the browser APIs say is valid in navigation. Both loading cached data and making the request again are valid. In the case of soft page navigation (onpushstate/onreplacestate) it's very clear that both are valid, as SPAs aren't expected to cache nothing, nor are they expected to cache everything.


If I’m currently filtering some search data and hit refresh (or the browser tab went to sleep and wakes up, or restored after a reboot) I expect it to be in the same place without having to search and filter again.



You would(n't) be surprised how many applications don't use this great feature.




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

Search: