每个网络请求是否发送浏览器Cookie? [英] Does every web request send the browser cookies?

查看:391
本文介绍了每个网络请求是否发送浏览器Cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个网络请求是否发送浏览器Cookie?



我不是在讨论页面视图,而是对图片,.js文件等的请求。 p>

更新
如果网页有50个元素,即50个请求。为什么会为每个请求发送SAME Cookie,不是缓存还是已知它已经存在?

解决方案

是的,只要所请求的URL在cookie中定义的相同域和路径(以及所有其他限制 - 安全,httponly,未过期等)保持,则cookie将针对每个请求发送。


Does every web request sent the browsers cookie?

I'm not talking page view, but a request for a image, .js file, etc.

Update If a web page has 50 elements, that is 50 requests. Why would it send the SAME cookie(s) for each request, doesn't it cache or know it already has it?

解决方案

Yes, as long as the URL requested is within the same domain and path defined in the cookie (and all of the other restrictions -- secure, httponly, not expired, etc) hold, then the cookie will be sent for every request.

这篇关于每个网络请求是否发送浏览器Cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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