3 ms·
> URL as the 'global state' Are there still (browser) limits on how long such a URL can be? Would it e.g. be possible to store a text of 50.000 words in the UR
by ohlookabird 6y ago
> URL as the 'global state'
Are there still (browser) limits on how long such a URL can be? Would it e.g. be possible to store a text of 50.000 words in the URL alone?
- londons_explore 6y agoWell you could always store the state in a database serverside and give the client some token to look up the state...
- wereHamster 6y agoAh the good old JSESSIONID…
- zodiakzz 6y agoYou can submit a form on click with an HTTP POST method - without any JavaScript. Doesn't make sense to cram so much data in a URL.
- csiegert 6y agoBut then you don’t keep the state in the URL.
- city41 6y agoModern browsers support very long URLs. Chrome supports URLs up to 2mb for example. Probably makes sense to think about the impact on users before using such long URLs, I have found it confuses people, and can also make sharing things on social media impossible.
- WrtCdEvrydy 6y agoYou wouldn't cram the entire state into it, but you would cram enough data to be able to recreate your state (ie, an API-backed application might store the parameters required to make API calls)