title: What's the point of the X-Requested-With header?
body: <p>JQuery and other frameworks add the following header:</p>
  
  <blockquote>
    <p>X-Requested-With: XMLHttpRequest</p>
  </blockquote>
  
  <p>Why is this needed? Why would a server want to treat AJAX requests differently than normal requests?</p>
  
  <p><strong>UPDATE</strong>: I just found a real-life example using this header: <a href="https://core.spreedly.com/manual/payment-methods/adding-with-js" rel="noreferrer">https://core.spreedly.com/manual/payment-methods/adding-with-js</a>. If the payment processor is requested without AJAX, it redirects back to the original website when it's done. When it is requested with AJAX, no redirection is done.</p>