| ▲ | vbezhenar 4 days ago | |
When the system evolves, you need to change things. State structure also evolves and you will refactor and rework it. You'll rename things, move fields around. URL is considered a permanent string. You can break it, but that's a bad thing. So keeping state in the URL will constrain you from evolving your system. That's bad thing. I think, that it's more appropriate to treat URL like a protocol. You can encode some state parameters to it and you can decode URL into a state on page load. You probably could even version it, if necessary. For very simple pages, storing entire state in the URL might work. | ||
| ▲ | oceanplexian 4 days ago | parent | next [-] | |
I think it depends on the permanence of the thing you’re keeping state for. For example for a blog post, you might want to keep it around for a long time. But sometimes it’s less obvious how to keep state encoded in a URL or otherwise (i.e for the convenience of your users do you want refreshing a feed to return the user to a marker point in the feed that they were viewing? Or do you want to return to the latest point in the feed since users expect a refresh action to give them a fresh feed?). | ||
| ▲ | tomtomistaken 4 days ago | parent | prev | next [-] | |
You can always do versioning. | ||
| ▲ | 4 days ago | parent | prev [-] | |
| [deleted] | ||