Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native, clear webview cookie?

It's possible to clear react-native webview cookie? when I replace to other view and back and mount webview again, it looks like the cookie still exist in the webview..

greetings

like image 397
Kacper Szeliga Avatar asked May 16 '17 14:05

Kacper Szeliga


1 Answers

You can use react-native-cookies to manage your app cookies.

import CookieManager from 'react-native-cookies';
// clear cookies on webview will mount!
CookieManager.clearAll()
  .then((res) => {
    console.log('CookieManager.clearAll =>', res);
  });
like image 189
FaiChou Avatar answered Nov 05 '22 16:11

FaiChou