Cobrowse Script
  • 19 Apr 2021
  • 1 Minute to read
  • Dark
    Light
  • PDF

Cobrowse Script

  • Dark
    Light
  • PDF

Article Summary

Installation

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

<!-- 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.

<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 it’s 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.

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 to start a session
  2. Enable using hotkeys to open the default Cobrowse modal (shift+space to open)
  3. Use the cobrowse_pin query parameter to directly navigate to a page to start a session

Session traversing multiple domains

Some additional configuration, javascript, and html must be added to support a Cobrowse session naturally following an end-user between multiple associated domains and sub-domains.




Was this article helpful?

What's Next