IE does not refresh after Ajax get/posts

前端 未结 5 770
旧时难觅i
旧时难觅i 2021-01-23 20:26

I have a small problem that I don\'t know how to deal with.

I\'ve written some jQuery post/gets which work fine in FF, Opera and Chrome. But when run from explorer (any

5条回答
  •  耶瑟儿~
    2021-01-23 20:47

    Try to add the following to the response header and the IE will not cache again:

    response.addHeader("Pragma", "no-cache");
    response.addHeader("Cache-Control", "no-cache");
    response.addHeader("Cache-Control", "no-store");
    response.addHeader("Cache-Control", "must-revalidate");
    response.addHeader("Cache-Control", "Post-Check=0");
    response.addHeader("Cache-Control", "Pre-Check=0");
    response.addHeader("Expires", "Mon, 1 Jan 2006 05:00:00 GMT");//in the past
    

    NOTE: the code is java code

提交回复
热议问题