什么是URL长度最佳的限制? 100,200 + [英] What is the optimum limit for URL length? 100, 200+
问题描述
我有一个ASP.Net 3.5平台和Windows 2003 Server的所有更新。
I have an ASP.Net 3.5 platform and windows 2003 server with all the updates.
有与.NET的限制,它无法处理超过 260个字符的。此外,如果你看它的网站,你会发现,IE 6失败,如果它不高于100 charcters修补工作。
There is a limit with .Net that it cannot handle more than 260 characters. Moreover if you look it up on web, you will find that IE 6 fails to work if it is not patched at above 100 charcters.
我希望有重写路径模块要在浏览器的最大数量的支持,所以我要寻找到,我可以创建详细的URL可以接受的限度。
I want to have the rewrite path module to be supported on maximum number of browsers, so I am looking for an acceptable limit to which I can create verbose URL's.
推荐答案
一个链接路径+查询字符串,并链接文章只有关限制的路径会谈。因此,如果你使用asp.net,不超过260个字符的路径。小于260会一直工作,asp.net与长查询字符串没有烦恼。
A Url is path + querystring, and the linked article only talks about limiting the path. Therefore, if you're using asp.net, don't exceed a path of 260 characters. Less than 260 will always work, and asp.net has no troubles with long querystrings.
http://somewhere.com/directory/filename.aspx?id=1234
^^^^^^^- querystring
^^^^^^^^^^^^^^^^^^^^^^^^ -------- path
典型地,问题是与浏览器。很久以前我做过测试,记得许多浏览器都支持4K的URL,除了IE,它限制了2083,所以对于所有的实际目的,它限制在2083我不知道,如果IE7和8有限制,但是如果你是打算广泛的兼容性,你需要去的最小公分母。
Typically the issue is with the browser. Long ago I did tests and recall that many browsers support 4k url's, except for IE which limits it to 2083, so for all practical purposes, limit it to 2083. I don't know if IE7 and 8 have the limitation, but if you're going to broad compatibility, you need to go for the lowest common denominator.
这篇关于什么是URL长度最佳的限制? 100,200 +的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!