Self-Hosted Scripts

Glance recommends referencing the Cobrowse script from the Glance CDN at When you use the Glance CDN:

  • Glance can easily provide you with updates and enhancements to the Cobrowse product.

  • Changes made using the button customization tool will be automatically applied without involving your website development team.

You can, however, host the scripts on your own server if you prefer. Glance will provide upgraded scripts approximately once per quarter, and will support the current version and at least one version prior.

NOTE: Excel Cobrowsing is not supported for customers who self-host the Cobrowse script.

To host the script on your company website instead of accessing it from our CDN, you will need to:

  1. The cobrowse script package can be obtained at: Contact Glance to determine the version x.y.z of Cobrowse script that your company should use.

  2. Unzip the package onto your web server.

  3. If you have customized your Cobrowse button using the button customization tool, download your custom skin CSS files into a customstyles directory of the unzipped package. Your custom skin files can be found at the following URLs (specify your unique group id in place of [groupid]):

NOTE: When the Cobrowse script is self-hosted, the script tag src attribute should reference the GlanceCobrowseLoader script as it is hosted on your company website.

<script id="glance-cobrowse"

NOTE: None of the other scripts, images, or style sheets in the package should be referenced in your website.

Upgrade a Self-hosted Script

Periodically, Glance releases updates to the Cobrowse JavaScript package. To upgrade your website to use the latest scripts, you will need to download a new package and put it on your website. The GlanceCobrowseLoader script in the new package is named with the new version number. You have a couple of options for dealing with upgrades:

  1. Once a new release is available, update your website to point to the new version. In other words, in the script tag above, change the version number to match the version number you are upgrading to.

  2. Use a configuration setting on your website to control the version number, for example: src=”<%=GlanceCobrowseVersion%>M.js“

  3. Copy the GlanceCobrowseLoader_x.y.zM.js script to a generic name “GlanceCobrowseLoader.js” and reference that name in the script src attribute. You will need to make sure that your server applies appropriate cache headers so that visitors will be getting the latest version after you upgrade.

Internet Explorer Deprecation

If your organization self-hosts the Cobrowse script, and you wish to continue supporting website visitors on Internet Explorer E11 after upgrading to cobrowse version 4.17 or higher, you will need to add some additional logic. Only cobrowse versions 4.15 and earlier support IE11 visitors, so you will need to detect the browser of the visitor and serve them the appropriate cobrowse script version. See below for an example of this logic. Details about our Internet Explorer deprecation policy are here.

function addCobrowseScript() {
  var scriptSrc = "";
  var isProduction = true; // Use this to specify "staging" or "production"
  var isVisitorIE11 = window.navigator.userAgent.indexOf("Trident/") > 0; // Detect whether the visitor is on IE11

  if (isProduction && isVisitorIE11) {
    // The version of cobrowse that an IE11 visitor will receive in production.
    scriptSrc = "";
  } else if (!isProduction && isVisitorIE11) {
    // The version of cobrowse that an IE11 visitor will receive in staging.
    scriptSrc = "";
  } else if (isProduction && !isVisitorIE11) {
    // The version of cobrowse that a non-IE11 visitor will receive in production.
    scriptSrc = "";
  } else if (!isProduction && !isVisitorIE11) {
    // The version of cobrowse that a non-IE11 visitor will receive in staging.
    scriptSrc = "";

  //  Create the script tag and add the rest of the attributes.
  var theCobrowseScript = document.createElement("script");
  theCobrowseScript.setAttribute("id", "glance-cobrowse");
  theCobrowseScript.setAttribute("type", "text/javascript");
  theCobrowseScript.setAttribute("data-groupid", 12345); // Use your company's group ID
  theCobrowseScript.setAttribute("data-site", "production"); // Use "staging" or "production" as appropriate.
  theCobrowseScript.setAttribute("charset", "UTF-8");
  theCobrowseScript.setAttribute("data-visitorid", "visitorId"); // If using Presence, define the visitor id.  Otherwise, omit.
  theCobrowseScript.setAttribute("data-presence", "on"); // Omit if not using Presence.
  theCobrowseScript.setAttribute("src", scriptSrc);

window.addEventListener("load", addCobrowseScript);

By continuing to use the site, you agree to the use of cookies. Learn More