Hello I have a problem with optimizing my vBulletin 4.0.3 Forum. my forum runs on Patientenfragen.net - wir haben die Antworten I have created 6 subdomains for static content (Images only currently) http://static1.patientenfragen.net/ http://static2.patientenfragen.net/ I have set the cookie domain for my forum in the acp cookie settings to use patientenfragen.net as cookie domain instead of .patientenfragen.net In my understanding this should exclude the subdomains from using the vbulletin cookie. On the subdomains there is no single html nor php file. Only the images and a htaccess with the following content: AddDefaultCharset Off FileETag None ExpiresActive On <IfModule mod_expires.c> ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/x-icon A2592000 ExpiresByType text/plain A2592000 ExpiresByType text/css A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType application/pdf A2592000 ExpiresByType application/x-shockwave-flash A2592000 </IfModule> Code (markup): After clearing my browser cache, apc cache and delete all cookies from my website in my browser PageSpeed still tells me that the static... subdomains serve cookies. The cookies still served for .patientenfragen.net are: - lastvisit - np_notices_displayed - lastactivity - sessionhash - cpsession - userid - password as well as the google analytics cookies - _utma - _utmb - _utmc - _utmz I use the analytics code suggested by digitalpoint and changed .domain.com to domain.com: <script type="text/javascript"> google_analytics_uacct = "UA-XXXXX-X";google_analytics_domain_name = "patientenfragen.net";var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-XXXXX-X'],['_setDomainName', 'patientenfragen.net'],['_trackPageview']);(function() {var ga = document.createElement('script');ga.type = 'text/javascript';ga.async = true;ga.src = 'http://www.google-analytics.com/ga.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);})(); </script> Code (markup): How can I fix this? Best regards StarBuG
Solved the problem by defining www.patientenfragen.net as cookie domain. Just in case some people have the same issue If anyone thinks that the above move is not a good Idea I am all ears, currently I can't see a downside to it StarBuG
In this case I recommend you a custom redirection for non-www to www to prevent another cookie problem in your forum. That will fix another issue that you can have. Rafael
One thing you may want to check is the scope of Google Analytics cookies (or AdSense or any other 3rd party system you are running on your site). If they are global for the domain (.patientenfragen.net), you are still going to be sending those cookies to the sub-domain serving static content. The only *real* way around it is to use a completely different domain for the static content (that's why we use dpstatic.com for that stuff).
I set the google analytics domain to .www.patientenfragen.net also and no other scripts set cookies on my domain. The images load now without cookies. The redirect to www. is in place for years now but thanks for the advice. Maybe if in the future conflicts arise I will use on of my other domains for the static content but for now it works. StarBuG