ActiveManage Docs ← Back to activemanage.co.uk

Polling

What is Polling

Polling is the lightweight, periodic background check the application performs from a logged-in browser to look for new data. It's how the activity feed updates, how unread chat counts refresh, and how the notification badge stays accurate without the user having to reload the page.

Browser DevTools network panel showing periodic XHR requests to /poll every 30 seconds with small JSON payloads

What Polling Returns

Each poll asks the server: “since my last cursor, has anything changed for this user that affects what is on-screen?”. The response is a small JSON document with deltas — e.g. “3 new chat messages”, “1 new browse view row”, “notification badge count is now 7”.

When to Poll vs WebSocket

  • Polling is the simplest option, requires no special infrastructure, and works through every corporate firewall.
  • WebSockets deliver updates instantly but need a persistent connection and may be blocked on restrictive networks.

ActiveManage uses both: WebSockets when available, polling as a fallback when the socket cannot establish or has dropped.

Example Scenarios

  • Bookings list: A receptionist leaves the bookings page open on a second monitor. Polling refreshes the row colour as appointments confirm or cancel.
  • Chat unread counter: The sidebar badge updates to show new messages even on networks where WebSockets are blocked.
  • Long-running task status: A bulk import job's status row updates without the user clicking refresh.
Tip: Polling frequency is a tradeoff between freshness and server load. The defaults are tuned for typical use — don't lower them below 10 seconds without measuring impact.

Configuring Polling Frequency

Polling frequency controls how often the browser asks the server for updates. It's a balance between user-perceived freshness and the load you put on the server (and the user's mobile data plan).

Site Settings polling panel showing three sliders: Active tab interval (30s), Background tab interval (60s), Idle interval (5m), and a toggle for 'Pause when offline'

Available Settings

  • Active tab interval: How often to poll when the user has focus on the application's tab. Default 30 seconds.
  • Background tab interval: Slower interval when the tab is open but not focused. Default 60 seconds.
  • Idle interval: Used when the user has been idle (no mouse or keyboard) for more than 5 minutes. Default 5 minutes.
  • Pause when offline: Stops polling entirely when the browser reports no network. Resumes on reconnect.

Tuning Examples

  • Receptionist dashboard: Tighten the active interval to 10 seconds so booking changes feel immediate. Server load is fine because there are few simultaneous receptionists.
  • Public portal: Loosen to 2 minutes — customers don't need second-by-second freshness, and your monthly costs drop.
  • Mobile-first app: Raise the idle interval to 15 minutes so a phone left in a pocket doesn't drain battery or burn data.
Warning: Reducing the active interval below 5 seconds is not allowed by the platform — the field clamps to 5s minimum. Anything tighter is what server-push (WebSockets) is for.