Web
Javascript SDK for Web

Installation

The Cobrowse SDK for web is available either using a <script> tag via CDN, or can be included in your build via NPM.
Script
NPM
Add this javascript snippet to the top of the <head> section of your website.
1
<script>
2
(function(w,t,c,p,s,e){p=new Promise(function(r){w[c]={client:function(){if(!s){
3
s=document.createElement(t);s.src='https://js.cobrowse.io/CobrowseIO.js';s.async=1;
4
e=document.getElementsByTagName(t)[0];e.parentNode.insertBefore(s,e);s.onload=function()
5
{r(w[c]);};}return p;}};});})(window,'script','CobrowseIO');
6
7
CobrowseIO.license = "put your license key here";
8
CobrowseIO.client().then(function(){
9
CobrowseIO.start();
10
});
11
</script>
Copied!
NPM distribution is currntly experimental. There may be breaking changes between versions.
First install the Cobrowse SDK for web via NPM:
1
> npm install cobrowse-sdk-js --save
Copied!
Then you can initialise the SDK:
1
import CobrowseIO from 'cobrowse-sdk-js'
2
3
CobrowseIO.license = '<your license key here>'
4
CobrowseIO.start()
Copied!

Add your license key

Please register an account and generate your free License Key at https://cobrowse.io/dashboard/settings.
This will associate sessions from your website with your Cobrowse.io account.

Try it out

Once you have your Javascript snippet and license key set up, navigate to https://cobrowse.io/dashboard to see your device listed. You can click the "Connect" button to initiate a Cobrowse session!
Note: Cobrowse needs to be able to access your website, so localhost addresses are not recommenced for testing. To test on a local development version, we recommend using ngrok.

Minimum browser requirements

Cobrowse.io for Web supports all major browsers including Chrome, Firefox, Safari, Opera, Edge, and IE11.
Our Web SDK has an optional "full-device" mode which enables the user to share their entire desktop without any installation. Due to browser limitations, this feature is not available on IE11, or in the mobile browsers such as Mobile Chrome and Mobile Safari. Please see our native Android and iOS SDKs for full device capabilities on mobile.
The specific browser versions supported are Chrome 16+, Firefox 11+, Safari 7+, Opera 12.1+, Edge 12+, and IE11.

Advanced configuration

Any questions at all? Please email us at [email protected].
Last modified 3mo ago