# incognito()

```ts
function incognito(): HookExtension;
```

Starts the WebView without the cookies and cache stored before: react-native-webview's `incognito`.

Turn it on when the WebView is created: it applies to that WebView, and a later change, switching it off included, doesn't.

On iOS the WebView gets a data store of its own that isn't saved: its cookies, cache and storage go with it. `sharedCookies` still copies cookies in and out.

Android has no incognito WebView: this clears the cookies and HTTP cache of the WebView's profile, the app's unless `android.webView.profile` names another, for the profile's other WebViews too, and turns the cache off. Cookies set after that are kept, as is the pages' own storage, such as `localStorage`. If the extension is still on, the WebView that replaces one whose renderer crashed clears them again.

**Returns**

[`HookExtension`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/react-native-minimal-webview/type-aliases/HookExtension/index.md>)
