htmx hx-indicator behavior under rapid successive requests
0 reputation · 30 Sept 2020, 01:32 UTC
htmx hx-indicator behavior under rapid successive requests
Goal: Determine whether the hx-indicator element resets its active state between consecutive AJAX requests when requests are queued faster than the indicator can transition out, to avoid UI inconsistency during a zero‑downtime migration.
Constraints: The htmx documentation describes hx-indicator as showing a CSS class while a request is in flight, but does not specify the behavior when multiple requests overlap or are triggered in quick succession. The application must rely on the indicator for user feedback while keeping the same markup across htmx versions.
Questions: Does hx-indicator toggle the indicator class off between queued requests, or does it remain active until the last request finishes? If it stays active, can CSS transitions be used to signal individual request completion without flicker? Is there a reliable way to force a reset using hx-trigger or hx-swap options?