Remix.run Logo
zahrevsky 2 days ago

> ?theme=dark&lang=en - UI preferences

Although the article is completely on point, I disagree that theme should be stored in URL.

Imagine you’re browsing a site, and at some point you switch from light to dark theme. After some time, you press “Back”. Do you really expect to switch back to light theme, and not to go to the previous page?

I've seen a lot of “well‑behaved” sites, that are storing their state in the URL, but I've never seen one, that stores current theme.

It’s interesting that the theme is part of the state too, yet you don’t want to store it in the URL. So, this means not every part of the state should be stored in the URL? Then what's the criteria for choosing what to store, and what not to?