I have a form which submits fine in FF, Opera, Safari, Chrome, and also IE8... But it wont submit in IE6, or IE7...
I have noticed it is 99% sure that the problem is a too long querystring. I have many many options...
Now, changing the method to POST is out of the question here, so don't bother asking about this please...
I wonder, is there any other workaround for this problem? Also, why is only IE6 and IE7 having this problem?
If there is no workaround, will "disabling" the "too many" inputs which are over the limit help shortening the querystring? In other words, will disabled form elements also be added to the querystring?
Thanks
I have a form which submits fine in FF, Opera, Safari, Chrome, and also IE8... But it wont submit in IE6, or IE7...
I have noticed it is 99% sure that the problem is a too long querystring. I have many many options...
Now, changing the method to POST is out of the question here, so don't bother asking about this please...
I wonder, is there any other workaround for this problem? Also, why is only IE6 and IE7 having this problem?
If there is no workaround, will "disabling" the "too many" inputs which are over the limit help shortening the querystring? In other words, will disabled form elements also be added to the querystring?
Thanks
Share Improve this question edited Aug 23, 2010 at 20:18 Guffa 701k111 gold badges756 silver badges1k bronze badges asked Aug 23, 2010 at 19:46 user188962user188962 3- Why is POST out of the question? – Amy B Commented Aug 23, 2010 at 19:48
- How long is your query? stackoverflow./questions/812925/… – hookedonwinter Commented Aug 23, 2010 at 19:51
-
2
Why is using
POST
out of the question? Because of errors you mentioned here? Perhaps we should look at those;GET
was never designed for sending large amounts of data; GET requests should be idempotent. – Marcel Korpel Commented Aug 23, 2010 at 19:51
6 Answers
Reset to default 2To answer your second question, Microsoft's got the answer here: http://support.microsoft./kb/208427 The maximum URL is 2,083 characters, so the page resulting from the GET request must have a URL shorter than that.
To answer your third question, w3/TR/html401/interact/forms.html#h-17.12: "Disabled controls can not be successful", i.e. they will not submit.
To answer your first, perhaps you can put a character limit on some of the fields, like a textarea. Another option might be to press the input using javascript, hashing it somehow, and then unhashing it server-side on the submitted page.
If you're sure that that's the issue, and not the million other cross browser problems, you could try an ajax call. Split up the query into 2, 3, n calls.
Is it just a form? May I ask why POST is out of the question?
its not great, but you could putt the value(s) in a cookie
To answer your last question first Disabled form inputs are NOT GETted or POSTed back to the server
If posting isn't an option, you can try eliminate non-essential form inputs, and although cheesy, reduce the length of the NAMEs of your elements will also shorten the Querystring.
You can also try to do some client side pression of the query string values in JavaScript.
I have had some success using base 93 encryption to get a significant reduction in string size.
You can also try huffman pression, although it is more processor heavy.
http://rumkin./tools/pression/press_huff.php
If you are only expecting a limited character set (lowercase a-z) you could e up with a few other tricks.
Query string too long error can be avoided by a simple IIS settings change. http://www.mytecbits./microsoft/iis/query-string-too-long