htmx 4.0 is under construction — migration guide

htmx.config.defaultTimeout

Default timeout for requests in milliseconds

The htmx.config.defaultTimeout option sets the default timeout for all htmx requests.

Default: 60000 (60 seconds)

Example

htmx.config.defaultTimeout = 30000; // 30 seconds
<meta name="htmx-config" content='{"defaultTimeout":30000}'>

Requests that exceed this timeout will be aborted.