Cookie issues
My response header contains a valid set cookie header but the cookie is not being saved in my browser cookie storage
3 Replies
What API are you using to set the cookie?
Can you verify the cookie header was received by your browser?
Why do you think it's not stored by your browser? (How did you verify?)
Have any code/screenshots? It's hard to debug with just the info you have provided.
can you provide a screenshot of the browser's network call response headers to show us what the cookie on the response looks like and what header it's passed under?
I fixed the problem, and now the code for setting the cookie looks like this: But I still don't understand, why does adding those attributes make it work? which one of them made it work? where can I read more about this? also why is it that the cookie always registered with Expires=session instead of the actual expiration date when I tried to add it?