I have a web service that I invoke from script but that does not need any information stored in cookies. Anytime I make a request to the service, the cookie is sent along with it. I understand that by default cookies are sent with HTTP request, but is there any way at all to override that behavior and not send the cookie?
In a nutshell, I am issuing my request like this:
$.ajax({
type: "POST",
cache: false,
url: url,
data: data,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(response) { successFunc(response); },
error: function(xhr) { errorFunc(xhr); }
});
question from:
https://stackoverflow.com/questions/2829201/prevent-cookies-from-being-sent-on-ajax-request 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…