views:

399

answers:

1

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?

+2  A: 

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

Gareth