Skip to main content
All CollectionsThe Fresh Relevance script
How our WebSocket connection works
How our WebSocket connection works

Our JavaScript code is added to each of your website pages to identify the type of page and send data back to our servers using a WebSocket.

Updated over 2 weeks ago

Using WebSockets is a secure and efficient method of transmitting data between the browser and the server.

The connection can be thought of like a phone call; once connected, both parties can talk back and forth until one of them hangs up. The WebSocket connection is continuously open (pending) to facilitate data transfer.

To see an example of this:

  1. In your web browser, go to your website.

  2. Open the Developer Toolbar (typically F12) in your web browser.

  3. Select the Network tab.
    ​Select WS to see just that protocol.

The continuously open (pending) nature of the WebSocket connection can cause it to be flagged as an issue by some monitoring and performance tools. This is because they're not designed to handle the protocol. However, this connection is perfectly normal and should not impact the performance of your site, so can usually be ignored.

In cases where making a WebSocket connection fails, our script falls back to sending data to our server through HTTPS instead

Did this answer your question?