Shared Worker

A Shared Worker is a browser API that allows multiple browser tabs or windows to share a single background thread. In WinCC OA, the OaRxJsApi uses a Shared Worker to maintain exactly one WebSocket connection to the backend, shared across all open tabs. This architecture reduces resource consumption and license usage compared to per-tab connections. The Shared Worker handles JWT-based authentication and token refresh, heartbeat monitoring with automatic reconnection, round-robin server failover for high availability, and reference-counted datapoint subscriptions that automatically clean up when no consumer remains. The Shared Worker is used by the WebUI Runtime, the Dashboard, and other web-based applications that connect via the OaRxJsApi.