[TIMOB-11090] Android: httpClient clearCookies() doesn't work.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-10-24T23:01:25.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3 |
Fix Version/s | n/a |
Components | Android |
Labels | api, parity |
Reporter | Amuktha Akkinepally |
Assignee | Hieu Pham |
Created | 2012-09-24T20:20:43.000+0000 |
Updated | 2017-03-22T20:51:48.000+0000 |
Description
When trying to clear cookies on logging out from webView, The clearCookies does not work on Android. it works perfectly fine on iOS.
Steps to Reproduce:
1. Load the app. 2. Enter the credentials. 3. click on logout Expected behavior: Logged out (since cookies are deleted) Actual Behavior: Nothing happened.code:
var win = Titanium.UI.createWindow({
backgroundColor:'#bbb',
navBarHidden:true
});
var logout = Titanium.UI.createButton({
top:0,
height:30,
title:'log out'
});
var webview = Ti.UI.createWebView({
top:30,
url:'http://m.facebook.com',
bu_url:'http://m.facebook.com'
});
logout.addEventListener('click', function(e) {
var client = Titanium.Network.createHTTPClient();
client.clearCookies('http://m.facebook.com');
webview.url = webview.bu_url;
});
win.add(logout);
win.add(webview);
win.open();
PR : https://github.com/appcelerator/titanium_mobile/pull/3199
I can't reproduce this bug on master.
I could reproduce the issue on the master build 3.1.0.v20121015140323. Could you please check this once again?
I am able to reproduce this problem now. This works on iOS because they use the same storage for httpClient cookies and webview cookies. On Android, however, that is not the case. We currently do not support cookies removal from a webview. I will create a feature request for this and close this ticket as invalid.
Closing ticket as invalid with reference to the above comments.