Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <p>Press the button below and inspect networks tab to see custom headers being transported</p>
  <button>Trigger $.ajax</button>
</body>
</html>
//
// In IE8 with "Enable native XMLHTTP support" disabled, the following
// $.ajax call will fire with the following custom headers in the request
//  - JQUERY
//
// instead of seeing:
//  - JQUERY
//  - JQUERY-1
//  - JQUERY-2
//  - JQUERY-3
//  - JQUERY-4
//  - JQUERY-5
//
// When null-value is observed in the "headers" object, all subsequent headers,
// including the null-value property, fail to attach properly.
//
var u;
function ajax() {
  var settings = {
    url: '/IvowaD/js',
    headers: {
      "JQUERY": 'latest',
      "JQUERY-BUG": null,
      "JQUERY-UND": u,
      "JQUERY-UND-1": undefined,
      "JQUERY-BUG-1": "YES",
      "JQUERY-BUG-2": "YES",
      "JQUERY-BUG-3": "YES",
      "JQUERY-BUG-4": "YES",
      "JQUERY-BUG-5": "YES"
    }
  };
  
  return $.ajax(settings);
}
$('body').on('click', 'button', function () {
  var xhr = ajax();
  console.log('Check your networks tab and look for the custom headers');
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers