Using the Prototype JavaScript framework I've noticed, that the Ajax requests are enriched with a header called X-Requested-With
.
Do other JavaScript libraries like jQuery, dojo and YUI add headers to their Ajax requests? Is it always called X-Requested-With
? Is this a standard?
The full header by Prototype:
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.5.0_rc0
The X-Requested-With header is sent by default by the following frameworks:
As usual, keep in mind that it is not mandatory for frameworks to send it, that sometimes the framework's user can override it, that client/firewall/proxy/server may affect it, and there are even known browser bug(s) for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With