-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cookie的设置 #48
Comments
怎么设置的cookie,document.cookie吗? |
是的,document.cookie = cookieKey + i + "=" + Math.random(); |
document.cookie设置的cookie不会同步到cookie存储域,所以新创建的WebView是没有的,根据你的情况,通过getReusedWebViewForHolder拿到的WebView始终都是那一个WebView,因为第一次用的时候已经设置过cookie了,所以下次复用的时候还有。 |
我知道了,谢谢,共用一个wkprocesspool好像就可以了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问下,我通过你的demo测试发现我把原生cookie设置的相关代码去掉,在wkwebview的一个页面,网页设置了cookie,退出后,重新进入浏览器还是可以有cookie的,但是如果你的网页不是通过getReusedWebViewForHolder初始化的就没有这个cookie了,不是很理解,这个cookie同步真实起作用的哪个
The text was updated successfully, but these errors were encountered: