Here is a simple trick that can help your site in performance.
Using a cookie free domain for static contents.
Step 1: Create a sub-domain. like cdn.yoursite.com or static.yoursite.com.
Step 2: Point the sub-domain to the wp-content directory of wordpress.
Step 3: Edit your wp-config.php file, add the following code
define("WP_CONTENT_URL", "http://static.yoursite.com");
define("COOKIE_DOMAIN", "www.yoursite.com");
Note: Make sure you use the "bloginfo('template_directory')" to load your static content in theme files.
To get more information about bloginfo.. visit here http://codex.wordpress.org/Function_Reference/bloginfo
0 comments:
Post a Comment