Chrome and Safari caching 302 redirect

后端 未结 2 1356
我在风中等你
我在风中等你 2020-12-30 12:08

Various flavors of this have been asked already, but I\'ve yet to see a real answer for this.

We have a separate image service that our web app uses to get some of i

2条回答
  •  天涯浪人
    2020-12-30 12:50

    cache-control: no-store

    I had the same maddening problem that you described (slightly different in that it was a missing cookie redirect back to the login page) that worked everywhere but Safari.

    In desperation, I came across this open WebKit bug and saw the fateful comment (and finally a glimmer of hope):

    CachedRawResource now keeps the redirect chain, and has some trivial logic for checking correctness, but it's nowhere near complete (only checks cacheControlContainsNoStore()). And of course other resource types don't have anything.

    Added no-store to my cache-control header and no more problem.

提交回复
热议问题