Guide
Tutorial on In App Browser
Using @capgo/inappbrowser
Capacitor plugin in app browser.
Install
bun add @capgo/inappbrowser
bunx cap sync
What This Plugin Exposes
goBack- Navigates back in the WebView's history if possible.open- Open url in a new window fullscreen, on android it use chrome custom tabs, on ios it use SFSafariViewController.clearCookies- Clear cookies of url Whenidis omitted, applies to all open webviews.clearAllCookies- Clear all cookies Whenidis omitted, applies to all open webviews.
Example Usage
goBack
Navigates back in the WebView's history if possible.
import { InAppBrowser } from '@capgo/inappbrowser';
await InAppBrowser.goBack();
open
Open url in a new window fullscreen, on android it use chrome custom tabs, on ios it use SFSafariViewController.
import { InAppBrowser } from '@capgo/inappbrowser';
await InAppBrowser.open({} as OpenOptions);
clearCookies
Clear cookies of url When id is omitted, applies to all open webviews.
import { InAppBrowser } from '@capgo/inappbrowser';
await InAppBrowser.clearCookies({} as ClearCookieOptions);
clearAllCookies
Clear all cookies When id is omitted, applies to all open webviews.
import { InAppBrowser } from '@capgo/inappbrowser';
await InAppBrowser.clearAllCookies();
Full Reference
- GitHub: https://github.com/Cap-go/capacitor-inappbrowser/
- Docs: /docs/plugins/inappbrowser/