I have in the below parameters for all ajax calls in the <head>
of my document. (I need this for an iOS ajax bug at https://stackoverflow.com/a/12856562/627473
$.ajaxSetup ({
cache: false,
headers: { "cache-control": "no-cache" }
});
I have a service that I am communicating with the specifically denies the cache-control header in any way.
So I tried the below BEFORE making ajax request.
$.ajaxSetup ({
cache: true,
headers: { 'Invoke-Control': 'EMVX' }
});
The above request still includes "cache-control": "no-cache" as a header. A requirement of the service I am making a request prohibits the cache-control header from being in the request (even if it is blank or has a cache value.
My request also includes the invoke-control (which I want); but I do NOT want cache-control to show up at all.
I even tried specifying headers in the $.post request by itself and it still merges the headers from $.ajaxSetup.
I am using jQuery v1.11.1. Is there a workaround?