什么是Cookie点规则? [英] What is the cookie dot rule?

查看:140
本文介绍了什么是Cookie点规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一起使用Google Analytics(分析)和Google网站优化工具。



GA cookies:

pre> __ utma
__umtb
__utmc
__utmz


b $ b

其中都由GWO和GA设置。我只希望看到一组这些cookie。 GWO在域名前面加上一个点:


.dev.example.com


虽然GA设置为:


dev.example.com


我尝试google并在 RFC2109 HTTP状态管理机制



在这里搜索SO,导致大量的答案引用cookie



这个规则究竟是什么,它有什么影响?


<我认为你理解cookie的工作原理,即任何HTTP请求的基础,浏览器将发送它存储的所有相关的cookie。

/ p>

针对域example.com设置的Cookie仅与请求 http://example.com ,而.example.com的Cookie也将与其所有子域相关


I am using Google Analytics and Google Website Optimizer together. On our development rig I suddenly realized that some cookies were set twice.

The GA cookies:

__utma
__umtb
__utmc
__utmz

where all set both by GWO and GA. I had only expected to see one set of these cookies. GWO set them with a dot in front of the domain name:

.dev.example.com

While GA set them as:

dev.example.com

I tried to google this and read something about it in RFC2109 HTTP State Management Mechanism

Searches for it here on SO, results in a number of answers referencing the "cookie dot rule", but I still don't really get it.

What exactly is that rule and which implications does it have?

解决方案

I take it you understand the basics of how cookies work, namely that with any HTTP request, the browser will send all "relevant" cookies that it has stored.

A cookie set for domain 'example.com' will only be relevant for requests to http://example.com, whereas a cookie for '.example.com' will be relevant to all its subdomains too

这篇关于什么是Cookie点规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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