Prompts

SharePush Web SDK — In-App Browser Bridge

How the SDK handles in-app webviews (Instagram, Facebook, TikTok) that block web push, and the 'open in Safari/Chrome' bridge it shows instead.

In-App Browser Bridge

Many visitors arrive through an in-app browser — the embedded webview inside apps like Instagram, Facebook, Messenger, TikTok, or Threads. These webviews frequently can't do reliable web push: the required APIs are missing or restricted.

Rather than showing a push prompt that would silently fail, the SDK detects the in-app context and shows a bridge modal instead — a short, friendly nudge to reopen the page in a real browser (Safari/Chrome) where push works and the site can be added to the Home Screen.

#Behavior

When the SDK boots and finds that:

  • the current environment doesn't support push, and
  • it's an in-app webview, and
  • inAppBridgeEnabled is true (the default),

…it shows the bridge modal instead of the push/PWA prompts.

If the environment is an in-app webview but push is somehow supported, the normal prompts run as usual.

#Enabling / disabling

On by default. Disable with:

 1Sharepush.init({ inAppBridgeEnabled: false });

If you disable it, in-app visitors on unsupported webviews simply see nothing (no broken prompt).

#Timing & cooldown

  • Appears quickly — 250 ms after load by default (inAppBridgeDelay / inAppBridgeTrigger).
  • After a dismissal it won't reappear for inAppBridgeDismissHours hours (default 12).

#Customizing copy

 1Sharepush.init({
 2  inAppBridgeTitle: 'Open in your browser',
 3  inAppBridgeMessage: 'This in-app browser has limited push support. Open in Safari or Chrome for the best experience.',
 4  inAppBridgeAllowText: 'Open in browser',
 5  inAppBridgeDenyText: 'Continue here'
 6});

#Why not just try anyway?

Forcing a push prompt in an unsupported webview leads to a confusing dead-end: the visitor taps "Allow" and nothing happens. The bridge converts that dead-end into a clear next step, preserving the chance to subscribe once they're in a capable browser.

Related: privacy browsers such as DuckDuckGo block push at the engine level. The SDK treats these as unsupported and won't show a broken prompt — see Browser & Platform Support.


Next: Event Tracking & Analytics →