Point of clarification: I don\'t have any problem adding a custom header to my jQuery ajax call, I want to have my custom header added to all ajax calls automatically.
You can use the ajax global event ajaxSend()
$( document ).ajaxSend(function( event, jqxhr, settings ) { jqxhr.setRequestHeader(name, value) });
Demo: Fiddle