Clear App Cache API
Clear your app cache with the WebToNative JavaScript API. Improve app performance and refresh stored data on Android and iOS.
To clear the cache when app is running.
window.WTN.clearAppCache(true);Note :- If you want to reload the app after cache is cleared you can call the function with value true.
window.WTN.clearAppData(true);Note :- To clear app data call the above function.
import { clearAppCache } from "webtonative";
clearAppCache(false);Note :- If you want to reload the app after cache is cleared you can call the function as below.
clearAppCache(true);Note :- If you want to clear all stored app data (not just cache) you can call the function as below.
clearAppData(true);Parameters:
Option
Boolean
If true, reloads the WebView after clearing. If false, the WebView is not reloaded.
Feature released on Android on 15/08/2023 Feature released on iOS on 01/03/2026 Functions updated on Android and iOS on 19/05/26
Last updated