Hacker News new | ask | show | jobs
by 7steps2much 1629 days ago
Chromium based browsers!

> The Google Chrome browser supports a maximum length of a web page URL of 2 MB (2048 characters) in size.

taken from [0]. Do note that this is a restriction created by the browser developers. In theory a URL can be of arbitrary length. Some browsers (like Firefox) do comply with this, though they might now show the full URL to the user, cutting it off after a certain number of characters.

[0]: https://mywebshosting.com/what-is-the-maximum-url-length-lim...

4 comments

What's interesting is how 2048 characters is 2 KB (a factor of 1000 difference) but this conversion of 2 MB = 2048 characters seems to have been copy-pasted around the web
2MB would be 2 million characters - if using ASCII characters, a bit less for special characters in UTF-8
Experimentally, you can easily verify that 2MB is the actual limit, not 2048 characters.

For example, the following domain renders just fine, despite being ~2076 characters long: https://postman-echo.com/get?foo1=aaaaaaaaaaaaaaaaaaaaaaaaaa...

See the upstream chromium docs: https://chromium.googlesource.com/chromium/src/+/refs/heads/...

I don't think adding ~10 or so characters to the TLD meaningfully impacts this limit.

That would be 2KB (the error is in the reference material; you cited it faithfully).