Handling Failed WebSockets Connection

Clef uses WebSocket technologies to provide real time interactivity with our services and your devices. This is more performant than the classical approach of constantly requesting information in the background via long polling.

However, despite WebSockets’s wide support in popular browsers and when used in hostile environments can lead to geographical location exposure despite being behind a proxy. Ad-blockers also may block hostnames associated with WebSocket providers. One in particular is the EFF’s Privacy Badger.

Restoring Support for WebSockets for Clef

Clef uses Pubnub as its third-party service for WebSockets. In order to ensure that Clef works like a charm, you’d have to whitelist the following hostnames whilst visiting our domains:

Domains to Whitelist:

  • ps*.pubnub.com

Our Domains:

  • getclef.com
  • *.clef.io

Using Privacy Badger, that’d look like the following when visiting a Clef site or a site that makes use of Clef: