# Cobrowse Script

- Updated on Apr 19, 2021
- Published on May 28, 2020

- 1 minute(s) read

### Installation

Into every page and every iframe within the same domain, the following lines of html should be added.

Code snippet

```markup
<!-- Preloading is an optional speedup -->
<link href="https://cobrowse.screenmeet.com/CobrowseCore.js" rel="preload" as="script">

<!-- Required -->
<script type="text/javascript" async="true" src="https://cobrowse.screenmeet.com/CobrowseBootstrap.js"></script>
```

If you are targeting older browsers, there is limited support for the browser api's required by Cobrowse, Internet Explorer 11 is the oldest browser currently supported. If you require support for IE 11 then the following script is required instead of the above.

Code snippet

```markup
<link href="https://cobrowse.screenmeet.com/CobrowseCore.compat.js" rel="preload" as="script">
<script type="text/javascript" async="true" src="https://cobrowse.screenmeet.com/CobrowseBootstrap.compat.js"></script>
```

### Security Settings

ScreenMeet’s Co-browsing package uses AJAX requests as well as WebSockets which reach out to ScreenMeet’s servers to perform its functions; therefore, to facilitate this and maintain a high standard of web security it is required that ScreenMeet’s api domain is added to the Content-Security-Policy white list.

Code snippet

```javascript
Content-Security-Policy: "connect-src 'self' https://*.screenmeet.com wss://*.screenmeet.com; img-src 'self' data: https://*.screenmeet.com; script-src-elem 'self' https://*.screenmeet.com; frame-src 'self' https://edge.screenmeet.com;"
```

### Starting a session

To start a session on a page containing the Cobrowse, create a session as an agent, you may use one of the following methods:

1. Create your own modal to collect the session pin and use the [provided methods](https://docs.screenmeet.com/v1/docs/creating-a-custom-ui) to start a session.
2. Enable using [hotkeys](https://docs.screenmeet.com/v1/docs/hotkeys) to open the default Cobrowse modal (shift+space to open).
3. Use the [cobrowse_pin query parameter](https://docs.screenmeet.com/v1/docs/starting-a-session-with-a-url) to directly navigate to a page to start a session.

### Session traversing multiple domains

Some [additional configuration, javascript, and html](https://docs.screenmeet.com/v1/docs/multiple-domain-and-subdomain-support) must be added to support a Cobrowse session naturally following an end-user between multiple associated domains and sub-domains.
