I have a form with a few fields. When you submit the form, the server responds with a redirect (HTTP 302).
When the form is submitted, if there is an <input type=file>
field, IE doesn't follow the redirect, but instead gives an error: "Internet Explorer cannot display the webpage".
If there is no <input type=file>
field, then it does follow the redirect as expected.
The HTTP 302 Response is exactly the same in both cases, differing only by the timestamp of the response.
I'm experiencing this in IE8 and IE9. (I haven't tried lower versions). Firefox, Chrome, Opera and Safari all follow the redirect as expected.
Notes:
enctype="multipart/form-data"
.To resolve this issue, install the most recent cumulative security update for Internet Explorer. To do this, go to Microsoft Update.
If you are running Windows XP you can simply refresh your TCP/IP by clicking on Start then Run and then typing command and then click OK. In the black command prompt type in netsh int ip reset resetlog. txt and then press ENTER on your keyboard.
Set the RedirectSitesFromInternetExplorerRedirectMode policy to Enabled AND then in the dropdown under Options: Redirect incompatible sites from Internet Explorer to Microsoft Edge, select Disable. This setting will stop redirecting as soon as the policy takes effect.
The question is 3 years old, but I recently ran into this problem myself and didn't find the correct answer anywhere. The answer marked as accepted here doesn't really answer anything.
What made a difference for me was adding the following header to the 302 response:
Connection: close
I was redirecting to another site with full URL, and it looks like IE is trying to optimize connections by sending subsequent requests over the same TCP stream without re-opening it, but is not smart enough to figure out that the site is different without explicit "Connection" instruction in the header.
This happens in at least IE10 and IE11, and none of the other browsers has this problem.
Is your redirect to a partial URL or a complete URL (with host, protocol, etc.)? I have seen plenty of examples in PHP where a redirect with 302 that does not have a complete http://server.dom/path/to/file in it will be ignored or mangled by IE. In Rails, this can be the difference between foo_path and foo_url in the router.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With