Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11090] Android: httpClient clearCookies() doesn't work.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-10-24T23:01:25.000+0000
Affected Version/sRelease 2.1.2, Release 2.1.3
Fix Version/sn/a
ComponentsAndroid
Labelsapi, parity
ReporterAmuktha Akkinepally
AssigneeHieu Pham
Created2012-09-24T20:20:43.000+0000
Updated2017-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();


Comments

  1. Anirudh Nagesh 2012-10-12

    PR : https://github.com/appcelerator/titanium_mobile/pull/3199
  2. Hieu Pham 2012-10-19

    I can't reproduce this bug on master.
  3. Amuktha Akkinepally 2012-10-20

    I could reproduce the issue on the master build 3.1.0.v20121015140323. Could you please check this once again?
  4. Hieu Pham 2012-10-24

    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.
  5. Hieu Pham 2012-10-24

  6. Lee Morris 2017-03-22

    Closing ticket as invalid with reference to the above comments.

JSON Source