ie9 loses cookies after redirect

后端 未结 5 1538
广开言路
广开言路 2020-12-10 15:24

I have an iframe that:

  1. does a post request to server
  2. server returns 302 and sets cookie
  3. browser not saves cookies but does a post(don\'t know
5条回答
  •  孤城傲影
    2020-12-10 16:16

    You may want to check the Expire vs. Max-Age setting on your cookie. IEs will not consider the Max-Age (maybe newer ones do, if no Expire is given?), but they will look at the local time and compare it with the Expire date. If local time is in the future, or server has the date in the past, the cookie will be considered as expired and will not be sent on the next request.

    I've also noticed that even if IE9 will tell you in the developer interface that it does a POSt, it really does a GET after a 302 redirect. As a note, the whole 302 thing is a bit messed up and sites should you 303 and 307, but anyway.

提交回复
热议问题