This is a migrated thread and some comments may be shown as answers.

Clearing cookies and cache from in app browser

1 Answer 1643 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard
Top achievements
Rank 1
Richard asked on 04 Feb 2014, 06:07 PM
We are using the in app browser (through window.open) to great effect, but it seems that (on iOS at least) the browser cookies are saved between app sessions. I can see how that might be useful in many scenarios, but in ours it presents a security hole as a different user may be picking up cookies from the previous user. Does anyone know of a way to clear the in app browser cache and cookies?

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Feb 2014, 01:25 PM
Hi Richard,

You can clear InAppBrowser cookies using the "clearsessioncache" attribute:

window.open("domain.com", "_blank", "location=no,clearsessioncache=yes"); 

which however appears to be available on Android. You can clear the session cookie via javascript directly or indirectly (via js framework like this one). Or you can utilize a custom Cordova plugin for the purpose, take a look at this one.

Regards,
Steve
Telerik
Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
Tags
General Discussion
Asked by
Richard
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or