JavaScript Technical Reference


Browser Requirements

Browsers that support Cross-Origin Resource Sharing are compatible with the JavaScript SDK:

  • Internet Explorer 8, 9, 10 and 11
  • Safari (Mac OS X) 5.0.x and above
  • Safari (iOS) 3.2 and above
  • Chrome 17.0 and above
  • Firefox 3.6 and above
  • Android Browser 2.1 and above

On a non-compatible browser, calls to the SDK will be ignored.

While compatability with every browser is desirable, the reality is that not every browser supports a consistent set of features. In those situations, the Medio SDK for JavaScript will gracefully downgrade features to prevent errors or the need for client code to adjust for browser compatability. The documentation for methods and classes that would be affected by downgrading will be called out explicitly.

Cross-Origin Resource Sharing

Browser support for the Cross-Origin Resource Sharing (CORS) specification is required for the SDK to use an AJAX request to reach the Medio Data Collection Service (DCS), which is hosted on another domain than your application.

Due to the way that CORS is implemented in Internet Explorer (IE) 8 & 9, the protocol used to communicate with the DCS service must match the protocol of the host page. When your application is running in IE 8 & 9, the SDK will automatically determine the protocol of the host page and use that protocol to communicate with DCS. In other words, if your application is hosted at http://mydomain.com, the SDK will communicate with the DCS service using the HTTP protocol. If your application is hosted at https://secure.mydomain.com, the SDK will communicate with the DCS service using the HTTPS protocol. If your website supports IE 8 & 9, it is important to consider the security needs of your application and host your pages using HTTPS whenever possible to ensure secure communication with the DCS service. On all other browsers, the SDK communicates with the DCS service using the HTTPS protocol regardless of the host page protocol.


JSON Support

In browsers that do not support the JSON object, the SDK will include a version of Douglas Crockford’s JSON library. If the SDK can determine that the host browser supports JSON, the browser native implementation will be used.

See http://www.json.org/js.html for additional information on Douglas Crockford’s JSON implementation.