开发者

window.location subject to querystring limitation

开发者 https://www.devze.com 2022-12-30 00:36 出处:网络
$(\'#button1\').click(function(){ window.location = "/Home/GetCustomers?"开发者_JAVA技巧; + $(\'#myForm\').serialize();
$('#button1').click(function(){
   window.location = "/Home/GetCustomers?"开发者_JAVA技巧; + $('#myForm').serialize();
});

Is using window.location subject to querystring size limitation? For instance, if my form has many parameters to serialize?


Window.location can't be longer than whatever URL length limit the user's browser enforces. This varies from browser to browser; the shortest one is Internet Explorer, which is 2083 characters.


The spec for URL length does not dictate a minimum or maximum URL length, but implementation varies by browser. On Windows: Opera supports ~4050 characters, IE 4.0+ supports exactly 2083 characters, Netscape 3 -> 4.78 support up to 8192 characters before causing errors on shut-down, and Netscape 6 supports ~2000 before causing errors on start-up.

0

精彩评论

暂无评论...
验证码 换一张
取 消