Verified against Semitexa Ultimate 2026.09.19.1020
Live Widgets
Set refreshInterval and the server keeps re-rendering the widget for you. Live UI without converting the page into an app shell.
The problem
Live UI often pushes teams toward a separate client-side state system for even simple status widgets. Polling code and reconnection logic usually leak into ad hoc JavaScript instead of staying part of the rendering model. The shell and the live widget can drift into two different architectures even though they belong to one page.
How it works
A deferred slot with refreshInterval set keeps its SSE connection open after the first delivery. The SERVER holds a coroutine for that page, re-renders the slot when the interval elapses, and pushes the new HTML down the connection the page already has; the client swaps it into position. Nothing is re-requested on a timer: there is no polling interval and no request per refresh. The browser does still open a request when the SSE connection itself has to be re-established — recovery is handled by the framework, so reconnection logic does not need to be written by hand, but those reconnects are real HTTP requests and count against authentication, rate limits and capacity like any other.
Key mechanisms
refreshInterval— declares the push cadence in seconds directly on the slot resource. Its cost is a held coroutine per connected user for as long as the page is open, which is what makes this a capacity decision and not only a UX one.- server push — the framework re-renders on its own clock and pushes; the page never polls.
- SSE reconnection — the framework recovers dropped connections automatically without custom retry code.
- SSR-first live UI — the slot stays part of the server-rendered page model rather than becoming a client-managed widget.
Why this matters
Without a framework-level refresh mechanism, live regions require bespoke polling loops, reconnection handlers, and custom HTML replacement code. Declaring refreshInterval on the slot keeps the live behavior co-located with the slot contract and removes the need for per-widget polling infrastructure.