I set a cookie in the request header before calling the loadRequest () function to load the page. I also use document.cookie () to set cookies using WKUserScript in accordance with [ WKWebView Cookies . However, I believe that if a 302 redirection occurs, the request may fail to lose the cookie. For example, the request http: // A is redirected to http: // B , I can set the cookie for the request http: // A using the request header and use WKUserScript, but these two methods cannot set the cookie for the request http: // B therefore, request 302 http: // B may fail. This situation is observed in ios8 more often than ios9. Does anyone have a workaround?
user5612625
source share