Re:URLs are state containers
by moritzwarhier on Friday November 07, 2025 @01:24PM
(#45849310)
I agree, this would be a good approach.
Unless of course, you initially visited the page with a stateful URL.
I would have one state for when the user first entered the page, and then the first time they modify a filter, add a 2nd state. From thereon, keep updating/replacing that state.
This way if the user clicks into the page, and modifies a dozen things they can
1. Refresh and keep all their filters, or share with a friend 2. Press back to basically clear all their filters (get back to the initial state of the page) 3. Only 1 more press of back to get back to where-ever they came from