jQuery发送的cookies在一篇文章? [英] Does jQuery send cookies in a post?

查看:124
本文介绍了jQuery发送的cookies在一篇文章?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,当我使用jQuery制作 $。post(...)时,是否是在发送请求中发送到服务器的任何Cookie?



谢谢!

解决方案

Cookie是通过Ajax请求发送的。 / p>

HTTPOnly 旗标是为Cookie设置的,此Cookie对于客户端脚本是隐藏的,但cookie仍然随Ajax请求一起发送。


I want to know if, when I make a $.post(...) with jQuery, is any cookie sent to the server in the post request?

Thanks!

解决方案

Cookies are sent with Ajax requests.

When the HTTPOnly flag is set for a cookie, this cookie is hidden from client-side scripts, but the cookie is still sent with Ajax requests.

这篇关于jQuery发送的cookies在一篇文章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆