How to clear react native webview cookies?
When I re-open the page, it remembers my account if I logged in on a website. But I don't want that.
Can I do this by injecting javascript?
For android, the "App info" setting, under Storage will allow you to clear cache. This is how you can force a reload of any resources you are displaying in the WebView.
Here is how I currently set it on the Login. js file in React Native: import Cookies from "universal-cookie"; const cookies = new Cookies(); cookies. set("token", token, { expires: 7, // 7 days path: "/" //,secure: true // If served over HTTPS });
Solved by using this: https://github.com/react-native-community/react-native-cookies
CookieManager.clearAll();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With