Why do IE9 aborts requests after a redirect ?


  • I am seeing that weird behavior with IE9 only

    I am using a POST (on page1 after user submit) and then redirect with 302 status code to another page. and when IE9 is loading the redirected page (page2), it aborts the requests to all the images and stylesheets of the page to download them again.
    So I have tried to use a 303 redirect which is more correct because I except a GET after the POST has been redirected.
    But I still see this aborted requests with IE9 only
    /page1 (POST) ==> redirect ==> /page2 (GET) ==> aborted requests here ==> requests again
    I am seeing in the detailed view of network capturing (dev tools) that:
    'This download occurred following a preparser restart (often due to either document mode switching or mismatched content encoding between a meta tag in the document and the BOM or a server header).'
    I have checked that images and stylesheets are served with the correct mime type. I have even tried to serve javascript with 'text/javascript' to match what's specified in <script> tags. The only way to fix this is to remove <!DOCTYPE html> from the header of the html (validated HTML5) in page2 !!! which is clearly wrong !
    If I simply reload the page (page2) it works without problem i.e there are no aborted requests. the aborted requests only happen during the redirect.
    screenshot of dev tools network capture
    (note that it shows a POST after the 303 but performs a GET ! Go figure)
    so please help me understand the intricacies of IE9 code
    All of this because I use a custom captcha system, where the captcha image is removed once it has been accessed. So this fails with IE9, because it gets a 404 after the aborted request

    • Edited by zebul666 Thursday, November 03, 2011 11:20 AM
    Thursday, November 03, 2011 11:18 AM

All replies

    • Marked as answer by Song TianModerator Wednesday, November 09, 2011 12:23 AM
    • Unmarked as answer by zebul666 Wednesday, November 09, 2011 2:00 PM
    Monday, November 07, 2011 7:44 AM
  • you mean I have to debug IE9 ?


    yes, fidller2 is great and powerfull tool. But right now, I can't get much more information from it.

    All I know is if I add a header like <meta http-equiv="X-UA-Compatible" content="IE=8">, remove <!DOCTYPE html> or manually use a IE mode that is not IE9, it works.


    I still don't know what choke/shake IE preprocessor so that it aborts and retry ressources on the page.

    my page is HTML5 valid.


    never mind

    • Edited by zebul666 Wednesday, November 09, 2011 8:09 PM
    Wednesday, November 09, 2011 2:00 PM