Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum length for url in chrome browser

I have seen this popular question:

What is the maximum length of a URL in different browsers?

But since I couldn't find a reference to Google Chrome directly (and since most answers were given a few years ago) I was wondering what is the current limitation of URL length for the Google Chrome browser?

like image 321
omer schleifer Avatar asked Feb 26 '13 13:02

omer schleifer


People also ask

Is there a limit to URL length?

The official documentation specifies a maximum length of 2048 characters for the <loc> element, which is used to submit URLs: URL of the page. This URL must begin with the protocol (e.g. “http”) and end with a trailing slash if required by the web server. This value must not exceed 2,048 characters.

How long can a URL query string be?

Although officially there is no limit specified by RFC 2616, many security protocols and recommendations state that maxQueryStrings on a server should be set to a maximum character limit of 1024. While the entire URL, including the querystring, should be set to a max of 2048 characters.

What is maximum URL segments?

In short. According to the HTTP spec, there is no limit to a URL's length. Keep your URLs under 2048 characters; this will ensure the URLs work in all clients & server configurations. Also, search engines like URLs to remain under approximately 2000 characters.


2 Answers

I believe it's stayed the same:

I could not find any limits on Chrome and Safari. Both are based on WebKit and it seems to have similar limits as Firefox has.

Firefox stops displaying after 64k characters, but can serve more than 100k characters.

you can read more about it in this article.

Generally speaking there is no "limit" to a URL's length, but this answer states that you should keep your URL's under 2048 chars regardless to make sure it works in every client and server.

More information about all browsers here.

like image 122
chriz Avatar answered Sep 27 '22 22:09

chriz


The current limit in Chrome is 2MB. This issue is discussed here:

https://code.google.com/p/chromium/issues/detail?id=69227

You'll find resources there such as a workaround when you need to overcome the issue for things such as displaying an image with a "toDataUrl" source.

like image 30
user3956437 Avatar answered Sep 27 '22 22:09

user3956437