MDDHosting Forums: cookie-less subdomain - MDDHosting Forums
Page 1 of 1
cookie-less subdomain
#1
Posted 26 March 2011 - 01:12 PM
I have been trying to server all my static content from a cookie-less subdomain because it is supposed to improve site performance. I am having trouble getting my subdomain to not leave cookies. I am running a wordpress site on that domain and I put this into the wp-config.php:
My site is in my signature.
define('COOKIE_DOMAIN', 'lrastart.org');My site is in my signature.
Countdown to tomorrow: 1 day.
My blog -- rubiverse.net
My blog -- rubiverse.net
#2
Posted 28 March 2011 - 08:30 AM
Adam, on 26 March 2011 - 01:12 PM, said:
I have been trying to server all my static content from a cookie-less subdomain because it is supposed to improve site performance. I am having trouble getting my subdomain to not leave cookies. I am running a wordpress site on that domain and I put this into the wp-config.php:
My site is in my signature.
define('COOKIE_DOMAIN', 'lrastart.org');My site is in my signature.
Give this a try:
define('COOKIE_DOMAIN', '.lrastart.org');
#3
Posted 27 October 2011 - 04:57 AM
Adam, on 26 March 2011 - 01:12 PM, said:
I have been trying to server all my static content from a cookie-less subdomain because it is supposed to improve site performance. I am having trouble getting my subdomain to not leave cookies. I am running a wordpress site on that domain and I put this into the wp-config.php:
My site is in my signature.
define('COOKIE_DOMAIN', 'lrastart.org');My site is in my signature.
useful post...good work...
#4
Posted 29 October 2011 - 01:03 AM
There are a few parts to accomplishing this.
First you must move the images to a different (sub)domain that is not included in any cookies you set. If the cookie is for example.com, then any subdomain is fine. If the cookie domain is .example.com (notice the leading dot), all subdomains would get the cookies and you would need to host the images on an entirely different domain.
Second you would need WordPress to "know" that these images are located in a different location. I imagine there must be a plugin for this, but I am not aware of any off hand.
Lastly, you need to be sure that nothing on the domain you use for images creates any cookies.
You could also look into using a CDN service for this which would add some additional benefits (and costs, generally). We also offer a plugin for CloudFlare which provides a lot of optimizations, bandwidth savings, and even improves your security. Their basic plan is not only free, but very feature rich. They also offer premium plans with enhanced features and SSL support. With regards to CloudFlare, I strongly advise using the cPanel plugin instead of signing up with CloudFlare directly. The plugin does a lot of DNS work in the background and saves you a lot of headache in the event of IP address changes.
First you must move the images to a different (sub)domain that is not included in any cookies you set. If the cookie is for example.com, then any subdomain is fine. If the cookie domain is .example.com (notice the leading dot), all subdomains would get the cookies and you would need to host the images on an entirely different domain.
Second you would need WordPress to "know" that these images are located in a different location. I imagine there must be a plugin for this, but I am not aware of any off hand.
Lastly, you need to be sure that nothing on the domain you use for images creates any cookies.
You could also look into using a CDN service for this which would add some additional benefits (and costs, generally). We also offer a plugin for CloudFlare which provides a lot of optimizations, bandwidth savings, and even improves your security. Their basic plan is not only free, but very feature rich. They also offer premium plans with enhanced features and SSL support. With regards to CloudFlare, I strongly advise using the cPanel plugin instead of signing up with CloudFlare directly. The plugin does a lot of DNS work in the background and saves you a lot of headache in the event of IP address changes.
█ Scott S. - MDDHosting, LLC - Professional Hosting Solutions
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ Incremental R1Soft CDP Backups on all services!
█ http://www.mddhosting.com/ - Follow us on Twitter! @MDDHosting
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ Incremental R1Soft CDP Backups on all services!
█ http://www.mddhosting.com/ - Follow us on Twitter! @MDDHosting
#5
Posted 29 October 2011 - 09:30 PM
Sorry for not updating this thread. I decided that it wasn't really necessary after all.
Although this would work, it's not the easiest way to do it. You could set a CNAME subdomain to point to your domain and call static resources from that subdomain. You don't have to move anything this way.
W3TC has a feature that allows you to have a "self-hosted CDN" and it does exactly this.
That's what I had trouble with.
I've been using CloudFlare before most people knew they existed, actually. I didn't know that the CF cPanel plugin does backend DNS work; that's interesting.
Scott S, on 29 October 2011 - 01:03 AM, said:
First you must move the images to a different (sub)domain that is not included in any cookies you set.
Although this would work, it's not the easiest way to do it. You could set a CNAME subdomain to point to your domain and call static resources from that subdomain. You don't have to move anything this way.
Quote
Second you would need WordPress to "know" that these images are located in a different location. I imagine there must be a plugin for this, but I am not aware of any off hand.
W3TC has a feature that allows you to have a "self-hosted CDN" and it does exactly this.
Quote
Lastly, you need to be sure that nothing on the domain you use for images creates any cookies.
That's what I had trouble with.
Quote
You could also look into using a CDN service for this which would add some additional benefits (and costs, generally). We also offer a plugin for CloudFlare which provides a lot of optimizations, bandwidth savings, and even improves your security. Their basic plan is not only free, but very feature rich. They also offer premium plans with enhanced features and SSL support. With regards to CloudFlare, I strongly advise using the cPanel plugin instead of signing up with CloudFlare directly. The plugin does a lot of DNS work in the background and saves you a lot of headache in the event of IP address changes.
I've been using CloudFlare before most people knew they existed, actually. I didn't know that the CF cPanel plugin does backend DNS work; that's interesting.
Countdown to tomorrow: 1 day.
My blog -- rubiverse.net
My blog -- rubiverse.net
#6
Posted 09 November 2011 - 03:16 PM
Adam, on 29 October 2011 - 09:30 PM, said:
I've been using CloudFlare before most people knew they existed, actually. I didn't know that the CF cPanel plugin does backend DNS work; that's interesting.
█ Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
█ http://www.mddhosting.com/ - Follow us on Twitter!
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
█ http://www.mddhosting.com/ - Follow us on Twitter!
Share this topic:
Page 1 of 1

Help














