What is the maximum length of a URL in different b

2020-01-22 10:49发布

What is the maximum length of a URL in different browsers? Does it differ among browsers?

Does the HTTP protocol dictate it?

标签: http url browser
17条回答
该账号已被封号
2楼-- · 2020-01-22 11:24

The URI RFC (of which URLs are a subset) doesn't define a maximum length, however, it does recommend that the hostname part of the URI (if applicable) not exceed 255 characters in length:

URI producers should use names that conform to the DNS syntax, even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length.

As noted in other posts though, some browsers have a practical limitation on the length of a URL.

查看更多
欢心
3楼-- · 2020-01-22 11:26

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.

查看更多
狗以群分
4楼-- · 2020-01-22 11:28

I have experience with SharePoint 2007, 2010 and there is a limit of the length URL you can create from the server side in this case SharePoint, so it depends mostly on, 1) the client (browser, version, and OS) and 2) the server technology, IIS, Apache, etc.

查看更多
ら.Afraid
5楼-- · 2020-01-22 11:32

There is really no universal maximum URL length. The max length is determined only by what the client browser chooses to support, which varies widely. The 2,083 limit is only present in Internet Explorer (all versions up to 7.0). The max length in Firefox and Safari seems to be unlimited, although instability occurs with URLs reaching around 65,000 characters. Opera seems to have no max URL length whatsoever, and doesn't suffer instability at extremely long lengths.

查看更多
一纸荒年 Trace。
6楼-- · 2020-01-22 11:32

ASP.NET 2 and SQL Server reporting services 2005 have a limit of 2028. I found this out the hard way, where my dynamic URL generator would not pass over some parameters to a report beyond that point. This was under Internet Explorer 8.

查看更多
登录 后发表回答