Its better to serve the static contents from separate cookie free domain. Which speed up your website. This is because browser will consider both as a separate domain.
The simplest way to create a cookie free domain in create a sub domain. By default what ever cookies created on main domain will be shared on sub domain also.
But in wordpress we can define that only for which domain it should store the cookies. So it will not get shared on subdomain.
Here are the steps for that:
First create a subdoamin. like cdn.xyz.com, images.xyz.com, i generally use static.xyz.com
Now point this domain to the wp-content directory of the wordpress.
Aftre doing this you need to edit the wp-config.php file which is located at the root of the wordpress.
You need to add below code in your wp-config.php file.
define("COOKIE_DOMAIN", "www.yourdomain.com");
Note: Please make sure that you have used “bloginfo(‘template_directory’)” to load your static content in theme files.
Please check here for more details about cookie free sub domain.
Pingback: My Stream » 10 Quick Tips: Optimizing & Speeding Up Your WordPress Site
Pingback: 10 Quick Tips: Optimizing & Speeding Up Your WordPress Site | Graphfucker
Pingback: 10 Quick Tips: Optimizing Your WordPress Site | Wptuts+
Pingback: 10 ??????? ?? ????????? ?????? ????? ?? WordPress | Wordpresso
Pingback: Wordpress Notes | notes.dvsi.net
Pingback: Disable Cookies using .htaccess file | Expert PHP Developer
Pingback: 10 Quick Tips: Optimizing & Speeding Up Your WordPress Site
Pingback: Cookie Free Domain Doesn't work - feed99