People like me are why you shouldn't run a hosting company
swizec.com
swizec.com
The web as a platform has no defined limits at all.
Vercel is an annoyingly happy path platform and makes too many assumptions about how things should work or be built.
An explanation for such a limit would certainly be worth disclosing.
[0]: https://chromium.googlesource.com/chromium/src/+/master/docs...
In particular, I think the URL should be copy-pasteable at all times, and according to your google's link, that means 32KB limit. I'd lower it to 8 KB just to be safe in case there is URL encoding involved.
I suspect that while it's a reasonable limit for them, it probably won't work very well to impose a limit on an established code base that's not been built with a limit in mind.
The biggest practical reason I can think of is directly relevant to their free tier: they cache heavily, that's not quite the whole point of the platform but it's a large part of its appeal to me. They're obviously not going to be able to cache everything even with a limit as low as 14kB, but they're happy-pathing projects that are at least vaguely amenable to caching.
In the meantime, I get to throw code at them and not care about where or how they execute it, and I really like that.
URL's are meant for human consumption and use -- to be copied and pasted, to fit in a message, to be typed in. They're analogous to phone numbers and addresses.
They're meant to be a pointer, a location, an index. Not a data payload. That's what POST variables are for.
No, web browsers shouldn't introduce an arbitrary limit to URL lengths. But for web hosts, it's entirely reasonable.
I mean, what, do you think filenames or filepaths should be 2 MB as well? That's absurd. But URL's are basically just the filenames of the internet.
URL's get stored in logs, analytics, and so forth, where they're expected to be short.
Payloads don't. So you put the payload part in the payload, not the address.
The nature of the web is changing, and has changed. Since GET requests can't have `body` data, if you have any hope of passing information along to a GET request, you must encode it in the URL in some way. This can be particularly important for things that contain unique but repeatable parameters that augment what you see on first load that would only be known by the consumer, and then can be shared by URL. For example, options set on a table you want to share with those options intact.
Or in the request headers.
The point is, once you switch from options to actual data, you switch from GET to POST. This is not a bug, this is a feature. POST is for posting data. GET is for retrieving it only, not for sending it.
We have a fairly complex set of options users can filter through (by design, and prior to its implementation, by high % of requests by users, FWIW) that need to be sharable on the GET request, they are definitely at least 12KB, likely more.
If you're unable to compress it further, why don't you implement a TinyURL-type scheme? Save the options on your backend and give them a pointer to the settings. And it can expire after 30d or 1y or never.
Then it actually becomes the size of something shareable.
URLs are resource locators. You're not locating a resource, you're passing a gigantic configuration payload.
Should it be? Probably not, but it’s a nice-to-have if you need to do something quick and dirty.
I'm not a fan of anything that has the word "rehydration" in it. Server is good at some stuff. Client is good at other stuff. Trying to blur the boundary seems like an engineering exercise in search of an application.
That said, there are many instances where you need server data and you don't want to get it post-render (thus avoiding the now dreaded spinners on first load), you don't have many options
React Router, Vue Router etc. None of them have any consideration for using them together, they either don't support it at all or make you choose.
I'm aware of the choice between path based routing, and hash based routing, which has some server side implications.
The History API manages entries in the client history, which I always thought a hash based router would still need to use. Maybe because a hash based router can work single page on the client without having to fake real resource paths?
edit: I'm only familiar with the vue side, but vue-router relies on the same code for both, I can only see minimal differences for the `#`, not much for the history management.
https://github.com/vuejs/router/blob/110c86929ac92e2428d8d49...
So, as we're down to opinion here, my personal pet peeve is: keep 'em short.
[0] https://www.ietf.org/rfc/rfc1738.txt
[0] https://github.com/plinkysynth/editor/blob/main/src/lib/comp...