Leverage browser caching to make your webpages faster. If you can leverage browser caching, you can increase website speed considerably. As Google starts considering site speed as a SEO parameter, webmasters can leverage browser caching to improve site speed and get better search engine rankings.
Getting rid of ETag
First of all, we need to disable ETag header since we are going to use Expires.
ETag technology is known as slow and problematic – even YSlow complains about it.
.htaccess: (located at blog’s root location)
Header unset Pragma
Header unset ETag
Why browser caching?
So if you configure your web server to set caching headers and apply them to all cacheable static resources, your site will appear to load much faster. Add below to .htaccess
What this does is adding far future expires header (make sure mod_expires is loaded in your apache config if you have problems) to your static content (images, js, css, etc).
Compressing things always ends up making them smaller and load faster, so implementing some form of compression on your components is a must. This optimization step might not work for you if your server does not have either
mod_gzip installed as part of Apache.
<FilesMatch “\\.(js|css|html|htm|php|xml)$”>SetOutputFilter DEFLATE</FilesMatch>