Re:How to store your app's entire state in the url
by michaelmior on Monday January 09, 2023 @03:33PM
(#34315600)
In your example, absolutely the first URL is better. But if as in the case of the OP, you're trying to encode an entire flowchart, I would argue it's a bit of a pointless exercise. Maybe you could come up with something reasonably readable, but I don't think anyone would care. It really depends on what kind of state you need to store.
[ Parent
| on HN ]
Re:How to store your app's entire state in the url
by moffkalast on Monday January 09, 2023 @07:21PM
(#34318528)
Whoever needs to copy that long intestine of a url definitely cares.
Re:How to store your app's entire state in the url
by michaelmior on Tuesday January 10, 2023 @05:08AM
(#34322644)
If you can shorten the URL, sure. But if data stored in the URL means it needs to be incredibly long, I don't think most users care whether it's readable or not. Of course, at a certain length, it's worth reconsidering whether storing all the data in the URL is a good idea.
Re:How to store your app's entire state in the url
by pifm_guy on Tuesday January 10, 2023 @04:58AM
(#34322564)
A flowchart can be encoded as simply the name of the state you're currently in.
Re:How to store your app's entire state in the url
by michaelmior on Tuesday January 10, 2023 @05:06AM
(#34322628)
How do you know what all the other states in the chart are and how they are connected?
Re:How to store your app's entire state in the url
by wildrhythms on Tuesday January 10, 2023 @08:57AM
(#34324863)
How would you predefine a state to include the flowchart nodes that the user creates?