Bug 144019
| Summary: | WKWebView loses cookies when deallocated | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Shreyas VA <shreyasv> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | andersca, dbates, shreyasv, stefan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | iOS 8.2 | ||
Shreyas VA
When a WKWebView is deallocated it loses cookies. On the next instantiation it does not retain all the cookies from the previous browsing session.
This is problematic because WKWebViews can be deallocated at any time during the app's lifecycle and this will result in a loss of cookies.
UIWebView does not suffer from this problem.
Steps to Reproduce:
1) Allocated a WKWebView using [[WKWebView alloc] init]
2) navigate to "http://www.html-kit.com/tools/cookietester/"
3) Set a test cookie by clicking on “Set Test Cookie”
4) Wait for the page to refresh and reflect that a cookie has been set
5) Deallocate the WKWebViewView
6) Allocate a new WKWebView and navigate to the same site
Expected Results:
Cookies should not be lost between different instances of a WKWebView.
Actual Results:
Cookies are lost.
Version:
iOS8.3
Notes:
GOOGLER:shreyasv
Configuration:
Any iOS devices.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Shreyas VA
rdar://20558665
Stefan Arentz
Does this also happen when you configure a WKProcessPool? I think that slightly changes the behaviour of web site data synchronization.
Shreyas VA
Can you add more detail on what you mean by configuring a WKProcessPool?
If you mean setting a different WKProcessPool on the WKWebViewConfiguration, then yes this bug repros even on that.