-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[CB-6389] add clearsessioncache option to iOS (like Android) #34
Conversation
Deleting cookies isn't the same as clearing cache. May I suggest renaming the option to 'clearcookies' for iOS, or better yet, clearing the cache with something like:
|
Umm... you're absolutely right there. And I'm not sure quite how I missed that. I'll reopen the original issue (CB-3617) since that's clearly not done. The option name should be changed here, and we should start thinking about parity on other platforms. Two issues to resolve:
|
Seems like a simple expectation, but AFAIK, all UIWebViews have a shared cache & cookie jar. We could probably clear them out for a whitelist/blacklist of domains though. |
The answer for #1 is no, unfortunately, which is the reason why I want this functionality and why I am clearing cookies. If you close() inappbrowser and open the same url, you get your cookies and your session back intact. The docs for clearsessioncache (on https://cordova.apache.org/docs/en/3.0.0/cordova_inappbrowser_inappbrowser.md.html) indicate that it clears the session cookie cache on android. So it seems that what we've got now is actually in parity with android. Though I completely agree that the name of the property is a bit misleading. 'clearcookies' does make tons more sense as a name, but I think that we are probably better off just duplicating the android functionality even with a bad name. In any case, what I really need is to be able to clear cookies, not the cache, so whatever the name ends up being I want to maintain the functionality. |
That's a very good point. The docs do indeed say it clears cookies. I'm inclined to agree with @mbradshawabs, and it would make more sense to replicate the functionality and rename the option in a separate change as it would be changing the API. |
I think @jak 's notion makes good sense. We can add new config options for 'clearcookies' and 'clearsessioncookies' that will trigger this functionality. We could note the current config options that reference the cache as deprecated and swing around later and remove them. |
Okay, so:
So this patch is good, and I"ll leave the issue closed, and update the docs. We could change the names of the options as another issue, but there are backwards compatibility issues to consider there. We would have to work within the deprecation policy, and I'd be uncomfortable reusing those names for some different functionality. |
This doesn't seem to work for clearing state data related to Google OAuth login. I believe Google uses cookies for this however I might be mistaken. Have any of you been able to clear out Google login information with the |
bump - what's the state of this? |
It's already been released in the plugin, back in April. |
I'd like to add the clearsessioncache option to iOS that Android has. The feature appears to be rather uncomplicated. If clearsessioncache is turned on, then when a url is open in the appbrowser, before it loads, I clear out all the cookies. This should effectively clear out any session that existed before, allowing for a clean slate.