blob: 8bd9838f18250de76b7eef7bafd756ad864de2f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
+++
title = "ajax-header"
+++
This extension adds the `X-Requested-With` header to requests with the value "XMLHttpRequest".
This header is commonly used by javascript frameworks to differentiate ajax requests from normal http requests.
## Install
```html
<script src="https://unpkg.com/htmx.org@1.9.11/dist/ext/ajax-header.js"></script>
```
## Usage
```html
<body hx-ext="ajax-header">
...
</body>
```
|