Matt Kruse said:
Can you create a test case where the URL is truncated?
Any time the URL is too long for IE, I've always seen it generate a
ridiculous error message that confuses everyone.
It seems the behaviour has changed since the last time I tested this.
Under Internet Explorer 6.0.2900 on my server the following code works
in Internet Explorer, but the URL produced _appears_ to be:
http://{server_name} Even though the original page loaded from
http://{server_name}/dir1/dir2/longurl.htm and "X" is alerted.
<script type="text/javascript">
document.write(window.location.href.length);
var search = window.location.search;
if ('X' == search.charAt(search.length - 1))
{
alert(search.charAt(search.length - 1));
}
var s = (new Array(2023)).join('-');
s += 'X';
document.write(';' + s.length);
</script>
<form method="GET" action="longurl.htm">
<script type="text/javascript">
document.write('<input type="hidden" name="a" value="' + s + '">');
</script>
<input type="submit" value="Test">
</form>
<script type="text/javascript">
document.write('<a href="longurl.htm?ts=' + (new Date()).getTime() +
'">Reset</a>');
</script>
Other values around 2025 result in various URLs with strange unicode
characters on them, but "X" still alerts. Changing the value in new
Array() to something absurd like 10000 results in the form not
submitting at all.