X-Requested-With Header Explained

What the HTTP X-Requested-With header does and when it's used.

Published October 15, 2026

The X-Requested-With header historically used to indicate an AJAX request, commonly set to "XMLHttpRequest".

Key points

  • Largely a legacy convention from before the Fetch API became standard
More HTTP articles