Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do current browsers accept cookies from an ajax response?

If I return a cookie with a response which is triggered by an ajax request, would the browser save the cookie?

like image 910
Uğur Gümüşhan Avatar asked Apr 02 '12 22:04

Uğur Gümüşhan


1 Answers

yes, from: http://www.w3.org/TR/XMLHttpRequest/

If the user agent supports HTTP State Management it should persist, discard and send cookies (as received in the Set-Cookie response header, and sent in the Cookie header) as applicable. [COOKIES]

like image 122
kuba Avatar answered Nov 13 '22 17:11

kuba