Discussion

Ask HN: How does HN preserve state so well?

I'm a bad tab hoarder and I have >500 tabs in my backlog, across many devices. One thing I've notices is that if I open an article from HN, if the <Back> button leads back to the HN homepage, it preserves the state exactly where I left HN opened at.

Maybe I haven't been on the static web in too long, but my memory is of pages refreshing whenever you hit back after some amount of time. Do they have a longer cache option? I don't see anything in their JS that suggests saving state.

6 points preciousoo 2 years ago 5 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton