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/
Keep going from Using @capgo/inappbrowser
If you are using Using @capgo/inappbrowser to plan native plugin work, connect it with @capgo/inappbrowser for the implementation detail in @capgo/inappbrowser, Getting Started for the implementation detail in Getting Started, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins.