Leverage Browser Caching and Enable Compression

Caching a WordPress website is easier with any caching plugin available in the WordPress repository. But sometimes you may feel that a lot of plugin may slow down your lovely website. That’s why you may choose to add code to your website instead of adding multiple plugins.

Here is my solution to leverage browser caching along with enabling compression. Open your .htaccess file located at the root of your WordPress installation. Leave the original code as it is and copy-paste the following gist code just below it:

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *