Internet Explorer 9可以使用多长时间的URL? [英] How long of a URL can Internet Explorer 9 take?

查看:104
本文介绍了Internet Explorer 9可以使用多长时间的URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去版本的Internet Explorer在超过2,083个字符的网址上出现问题(请参阅 http:// support。 microsoft.com/kb/208427 )。同时,Firefox,Opera和Safari可以处理至少80,000个。

Past versions of Internet Explorer croaked on web addresses longer than 2,083 characters (see http://support.microsoft.com/kb/208427). Meanwhile, Firefox, Opera, and Safari can handle at least 80,000.

版本9带来了许多改进。 URL长度是其中之一吗?

Version 9 brings many improvements. Is URL length is one of them?

推荐答案

不是最准确的答案,但它在地址栏中看起来像2083个字符关注链接时为5165个字符。

Not the most precise answer, but it looks like 2083 characters in the address bar and 5165 characters when following a link.

(不以任何方式官方,只需将带有41,000个字符的URL插入测试HTM文件并使用Javascript查询URL长度。 )

(Not official in any way, just plugged a URL with 41,000 chars into a test HTM file and used Javascript to query the URL length.)

更新:

要重现测试,请创建一个包含以下内容的HTML文件:一个锚元素,其HREF属性为6000个字符长。在浏览器中打开文件,然后单击链接。然后弹出打开控制台并检查 window.location.href.length

To reproduce the test, create an HTML file with an anchor element whose HREF attribute is 6000 characters long. Open the file in your browser and click the link. Then pop open the console and check window.location.href.length.

今天在IE9中执行此过程后,它会将长度报告为5165个字符。如果我通过地址栏手动加载相同的URL,它会报告2083个字符。

Following this procedure in IE9 today, it reports the length as 5165 characters. If I load the same URL manually through the address bar, it reports 2083 characters.

对于它的价值,IE似乎在发送请求之前截断了URL。如果我在锚点的HREF属性中放置了24,000个字符的URL,IE将跟随该链接,但结果页面报告的URL长度为5165个字符。在Chrome中使用相同的链接会导致我的测试服务器发出HTTP 414响应。

For what it's worth, IE seems to truncate the URL before sending the request. If I put a URL of 24,000 characters in the anchor's HREF attribute, IE will follow the link but the resulting page reports a url length of 5165 characters. Following the same link in Chrome results in a HTTP 414 response from my test server.

这篇关于Internet Explorer 9可以使用多长时间的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆