Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems trying to create a cookieless domain due to Adsense

Following the advice on google's pagespeed addon, I moved my static content (images, css, javascript files) to a subdomain of my site on which there should be no cookies, thus saving some space in the request headers for each request for these files. However, on looking at the results I find that cookies are still being created for this sub domain. I have google adsense on my site and it is writing cookies to the root domain *.example.com rather than only to www.example.com

Is there any way to force adsense to write cookies only to the exact domain used for displaying the adds and not to the root domain?

like image 504
Rincewind42 Avatar asked Jun 16 '11 04:06

Rincewind42


1 Answers

There appears to be no way to force adsense to create cookies for only a specific subdomain. The generally used solution is to simply serve your content from an entirely different domain. SO uses sstatic.net, Yahoo uses yimg.com, Youtube uses ytimg.com.

I'd recommend just getting a new domain name. It's only $10 a year or so (depending on your TLD). The ROI of that is, what, 10 minutes developer time?

like image 110
Sander Marechal Avatar answered Oct 17 '22 08:10

Sander Marechal