Allen Gingrich
Allen Gingrich

Reputation: 5657

Using jQuery AJAX to communicate with server, can I set a cookie/session?

In my example, I am sending login details to a server-side script via AJAX that in turn sets a session/cookie variable.

My question is will the cookie/session be set after I get a response, or do I actually have to visit the server-side script the regular way to set them?

Thanks!

Upvotes: 0

Views: 322

Answers (1)

Teej
Teej

Reputation: 12873

Yes. Your cookie/session will be set. You can try it by send another request.

Upvotes: 1

Related Questions