Skip to main content

How our WebSocket connection works

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.

Fresh Relevance adds a small JavaScript snippet to each page of your website. This script identifies the type of page being viewed and sends relevant data back to Fresh Relevance using a WebSocket connection.

WebSockets provide a secure and efficient way to send data between a visitor’s browser and the Fresh Relevance servers.

You can think of the connection like a phone call: once connected, both sides can send and receive information until one side closes the connection. While active, the WebSocket remains open (shown as Pending) so data can be sent in real time.

How to view the WebSocket connection

To see this in your browser:

  1. Open your website.

  2. Open Developer Tools (usually by pressing F12).

  3. Select the Network tab.

  4. Select WS to show only WebSocket connections.

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 it 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?