开发者

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

开发者 https://www.devze.com 2023-01-30 18:51 出处:网络
In my example, I am sending login details to a server-side script via AJAX that in turn sets a session/cookie variable.

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 开发者_JAVA百科I actually have to visit the server-side script the regular way to set them?

Thanks!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消