, , . Jfriend00 , W3 getAllResponseHeaders() , Set-Cookie. Dan Tao , (?) cookie , , , ! "- setTimeout ".
( ), Drew Marsh "WCF → ASMX Cookies" - WCF.
- (, ), WCF , , , , ( cookie) WCF, :
WebOperationContext.Current.OutgoingResponse.Headers.Add("cloud", "lonely");
, JavaScript/jQuery/Ajax cookie, :
$(document).ready(function () {
$.ajax({
url: "/ScratchpadSite/Service.svc/Hallo",
type: "POST",
success: function (data, textStatus, jqXHR) {
$('body').html('<p>Father ' + data.d + '<\/p>');
},
error: function (jqXHR, textStatus, errorThrown) {
$('body').html('<p>' + textStatus + ': ' + errorThrown + '<\/p>');
},
complete: function (jqXHR, textStatus) {
var cloudsFeeling = jqXHR.getResponseHeader("cloud");
if (cloudsFeeling) {
document.cookie = "cloud=" + cloudsFeeling;
}
},
});
});
HTTPResponseHeader , , , , , , .