Skip to main content
Back to plugins
@capgo/inappbrowser
Tutorial
by github.com/Cap-go

In App Browser

Open web pages in a customizable in-app browser without leaving your application

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 When id is omitted, applies to all open webviews.
  • clearAllCookies - Clear all cookies When id is 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