Search code examples
react-nativereact-native-webview

Is there any way to clear cache in JS level. need to clear browser cache/ session and cookies


I have a http call to an api, the first call is ok, during using the application there are https calls under same domain. even though consequence https calls are not happening within webview but all http url under the same domain will redirect to https in the webview.


Solution

  • You can work this out through the React Native built-in module.

    You can use RCTNetworking

    var RCTNetworking = require("RCTNetworking");
    RCTNetworking.clearCookies();