I haven’t used WordPress before, but someone wants me to tune the performance of his WordPress site. So I ran performance test with Yslow and found some stuffs that needs to be fixed. Amongst is to set a cookie free domain of some highlighted links not in CDN. I googled on how to do that and profoundly found a solution to open wp_config.php file and add the following:
define("COOKIE_DOMAIN", "www.domain.com");
define("WP_CONTENT_URL", "http://static.domain.com");
Now my question is given that I have more than 15 components do I need to repeat this steps for all the 15 components with the same constant variable names “COOKIE_DOMAIN”, “WP_CONTENT_URL”. If no, please what is the ideal way to set Cookie free domain for more than one component.
Your static.domain.com URL is where you would deliver all of your static components from, which you do not want to contain a cookie. You would then point your static subdomain to the /wp-content directory of your WordPress installation.
Therefore there is no need to repeat the step above for each static component, you just need to move over the assets to your subdomain.
You may want to take a read through this article on how to use cookie free domains.