Get and store cookie (from Set-Cookie) from an AJAX POST response
问题 I have a simple jQuery AJAX POST code: $.ajax({ type: "POST", url: AppConstants.URLs.PROXY, data: message, xhrFields: { withCredentials: true }, success: function(data, status, xhr) { console.log("Cookie: " + xhr.getResponseHeader("Set-Cookie")); } }); and I wish to get the cookie and save it using cookies-js. But according to http://www.w3.org/TR/XMLHttpRequest/#the-getallresponseheaders%28%29-method: Return all response headers, excluding headers that are a case-insensitive match for Set