Product documentation and training for Shipcode.
Basic Components: Web Content
A native-only component that allows you to embed a webpage or an entire website into your native application.

The Web Content is a native-only component that allows you to embed a webpage or an entire website into your native application, essentially embedding a mini web browser into the current screen. By default, the user is permitted to click and follow links within the embedded page unless configured otherwise using the available properties.


📍📍📍 Note 📍📍📍

If you only need to render static HTML content inside a native app, you should use the HTML View component instead.

Available Properties

These properties are configured in the Settings Panel and control the embedded browser's initial content, navigation security, and behavior.

  • Target URL (Settings Panel): This is the initial URL that will be displayed when the component loads.
  • Domain WhiteList (Settings Panel): Used to specify which domains a user can access while interacting with the Web Content. If the user clicks a link that does not match a whitelisted domain, the navigation attempt will be blocked.
    • Note: If you do not specify any whitelisted domains, the user will be restricted to the current URL specified in the Target URL property. This restriction can be overridden by enabling Ignore Web View Redirects.
  • Special URLs (Settings Panel): Allows you to provide a list of URLs that should take the user out of the webview and redirect them back into your native app. This is useful for custom flows, such as redirecting a user to your native checkout flow if they attempt to navigate to checkout within the embedded page.
    • When a user encounters a Special URL, Shipcode will navigate the user to a Layout that is registered with a Route containing the same URL. If no matching Layouts are found, the Fallback Layout will be displayed.
  • Ignore Web View Redirects (Settings Panel): By enabling this option, any URL validation performed by Domain White List and Special URLs will be bypassed, meaning the user can follow any link within the Web Content.
  • Injection Payload (Settings Panel): Specifies an arbitrary JavaScript payload to be injected every time a web page is loaded within the component.
  • Selected User Agent (Settings Panel): Allows you to override the default user agent string provided to the website.
    • Default: Does not override the user’s existing user agent string.
    • Mobile: Provides a user agent string indicating the user is on a mobile device.
    • Desktop: Provides a user agent string indicating the user is on a desktop device.
Did this answer your question?