IFrames support

Cross-document IFrames

Note: IFrames that are not cross document are supported out-of-box without adding the SDK to the embedded page. This guide is for supporting cross document IFrames.
To use Cobrowse for Web with cross document IFrames you will need to add our javascript snippet to the page being embedded. You will then need to add a list of trusted origins to the embedded page and the parent page:
CobrowseIO.trustedOrigins = [
'', // parent origin to trust
'' // another parent origin to trust
It is not necessary for the embedded page to contain the Cobrowse license key, if provided it will be ignored.

Code example

See our JS examples repo for the parent and child SDK configuration:

Running only in an IFrame

A few customers want to run only within an IFrame, and not any containing or parent page. This is supported, but requires passing an extra configuration option when starting Cobrowse.
Last modified 10mo ago