HTTP X-Requested-With Header
Identifies that the request was made with JavaScript (e.g., via XMLHttpRequest). Commonly used to distinguish AJAX requests from normal browser navigation.
Purpose
Allows servers to identify AJAX requests and apply different handling or security rules.
X-Requested-With: XMLHttpRequest Example: X-Requested-With: XMLHttpRequest
Code Examples
See how to use the X-Requested-With header in different tools and languages.
Related Headers
Origin
Indicates where the request originates from. Used in CORS to determine if the server allows cross-origin requests.
Referer
Contains the address of the previous page from which the current page was requested. Used for analytics, logging, and cache optimization.
Content-Type
Indicates the media type (MIME type) of the resource being sent. Tells the client how to interpret the response body.