htmx.config.noSwap
Sets HTTP status codes that skip swap
The htmx.config.noSwap option is an array of HTTP status codes for which htmx will not perform a content swap.
Default: [204, 304]
Example
htmx.config.noSwap = [204, 304, 205];
<meta name="htmx-config" content='{"noSwap":[204,304,205]}'> Responses with these status codes will trigger events but won’t swap content.
See Also
Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/config/htmx-config-noSwap/