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?
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With