Skip to main content
By default the Web Widget polls the platform: after a visitor sends a message it asks for the conversation every 1.5 seconds for a while, then every 5 seconds, and it refreshes the conversation list in the background to keep unread badges current. That works everywhere, but a reply can sit for up to a few seconds before the visitor sees it, and idle visitors keep making requests. Realtime delivery opens one WebSocket per browser tab instead. Replies, typing and closed conversations arrive the moment they happen, and connected visitors drop to an occasional safety check. It is a per-channel setting: new web widget channels have it on, and channels created before realtime delivery existed keep polling until you tick the box.
Turning it on never breaks a chat. Whenever a socket cannot connect — a corporate proxy that blocks WebSockets, a full cluster, a network blip — the widget stays on polling exactly as before, and switches back to the socket as soon as it can.

Check or change it

1

Open the channel page

In the dashboard, open your bot, click Channels and pick the web widget channel.
2

Look under Delivery

Under Delivery, Push replies over a WebSocket (realtime) is ticked on every channel created recently; tick it on older channels, or untick it to keep a channel on polling, and save. The channel list shows a Realtime badge next to every channel that has it on.
3

Check the readiness panel

Test your web chat at the top of the channel page lists a Realtime delivery row. It reads on (Reverb) when everything is in place. A warning there means the platform server the widget talks to has no WebSocket cluster attached yet: the setting is kept and takes effect once one is, and visitors stay on polling until then.
4

Try it

Start the test chat and send a message. The reply appears without a visible delay, and ChatbotWidget.transport() in the browser console returns 'socket'.

What changes for visitors

Everything else is unchanged: the same conversations, the same identity tokens, the same unread badges and notification ping.

When the socket opens

The widget only connects when there is something to deliver:
  • A socket opens when the visitor opens the panel, or on page load when they have chatted before on this site. A first-time visitor who never opens the chat never uses a connection.
  • One socket per browser tab. It is tied to the visitor’s identity, so swapping the identity token (a sign-in or sign-out in your app) reconnects it.
  • Background tabs keep their socket so the notification ping and unread badges keep working while the visitor is elsewhere.
  • Closing the tab, or the session expiring, closes it.
While the socket is up, the widget still fetches the open conversation every 30 seconds and the conversation list every 60 seconds as a safety net, and it catches up with one fetch every time the socket (re)connects. Long replies that do not fit in a single WebSocket frame are fetched the same way, so nothing is ever lost.

Fallback to polling

The widget decides on its own, per tab, and needs nothing from your page:

Host-page controls

You can keep a page on polling, read which transport is active, and react when it changes.

Keep a page on polling

Add data-realtime="off" to the embed snippet:
Or, with programmatic setup:
Both only turn the socket off for that page; they cannot turn it on for a channel whose toggle is off.

Read the active transport

'socket' means replies are being pushed right now. 'poll' covers everything else: the toggle is off, the socket is still connecting, or it dropped and polling has taken over.

React to changes

The widget fires chatbot-widget:transport on window every time the transport switches:
Use it, for example, to show a “live” dot in your own UI, or to log how often visitors fall back to polling.

Connections and cost

The platform’s WebSocket capacity is provisioned as a maximum number of concurrent connections, and every open chat tab on every site that has the toggle on counts as one while the visitor has the panel open or has chatted before, including background tabs. Messages are not metered. Before switching a busy site on, estimate the peak number of visitors who have the chat open at the same time. If you expect it to be large, enable the channel first on a lower-traffic page (or keep high-traffic pages on polling with data-realtime="off") and ask us about capacity. If the limit is reached, nobody loses the chat; the visitors who could not connect simply stay on polling.

Troubleshooting

Next steps

Web Widget channel

Embedding, identity tokens, conversations and theming

Bot Behaviors

Typing indicators, debouncing and reply detection