Why is a set-cookie header being ignored by browser and the cookies not saved from an Ajax call using fetch?
<p>For some reason my browser (I've tried several) is not setting cookies even though a valid set-cookie response is being returned by the server when the GET call is made via Ajax using the <a href="https://davidwalsh.name/fetch" rel="nofollow noreferrer">fetch</a> api to make the request</p>
<p>If I make the identical GET call via just putting the URL in the browser, the (identical) set-cookie response headers are respected by the browser and the cookies are saved.</p>
<p>I've inspected the request and response headers via LiveHeaders and the Chrome network inspector and there is no difference.</p>
<p>EDIT:  To clarify, this is NOT a problem with ajax sending cookies to the server.  It is a problem where the cookies are not saved by the browser at all when a response comes back with valid set-cookies headers (which according to documentation should be respected whether ajax or not).</p>