I make some Ajax calls like getting files through jQuery:
$ Ajax ({url: "/resx.mvc", data: {virtualPath: options.virtualPath, key: options.keys, global: options.global}, cache: true, success: function (value) {$. Assign, value);}, data type: "JSON", traditional: true}); When I see the request in the fielder, then I see that these two headers are being sent, and by sending my ASP.Net, the header expires with 1 response: Pragma: no-cache cache-control: no-cache How do I not tell that jQuery to release no-cache?
takes preceded an AJAX object (XMLHttpReject Object) that you use to manipulate the request header can do. Below is an example of setting a header in your request using the given AJAX object in the callback:
$. Ajax ({type: "POST", first send: function (request) {Request SetRequestHeader ("authorization", authorization token);}, url: "entities", data: "json =" + escape (JSON.stringify (createRequestObject ), Process data: incorrect, success: function (msg) {$ ("#") .append ("result =" + StringifyPretty (msg)}}}});
Comments
Post a Comment