cordova-plugin-cookie-manager
v0.0.2
Published
Provides methods to manage cookies from your app's JavaScript code. At the time of writing, the only available method in this plugin clears all cookies.
Downloads
45
Maintainers
Readme
Cordova/PhoneGap Cookie Manager Plugin
PhoneGap/Cordova plugin that allows you to clear cookies from WebViews. You can use it for stuff like logging out users, restarting analytics sessions and the like.
Why a plugin?
In a Cordova/PhoneGap app document.cookie
is empty, since index.html and all other files are loaded with the file://
protocol.
Cordova/PhoneGap manages cookies internally, but doesn't expose any means for clearing them.
Installation
CookieManager is compatible with Cordova Plugman and ready for the PhoneGap 3.0 CLI, here's how it works with the CLI:
$ cordova plugin add https://github.com/teunsteenbekkers/cordova-plugin-cookie-manager.git
$ phonegap local plugin add https://github.com/teunsteenbekkers/cordova-plugin-cookie-manager.git
Usage
window.cookieManager.clear(function() {
console.log('Cookies cleared!');
});