How to rank more in Google PageSpeed Insight?

When you try to check the page load speed of your website, Google suggests you number of points to correct and work on.

Particularly it says…

Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network. Leverage browser caching for the following cacheable resources:

How to solve this problem?

Well its rather simple. I am suggesting you the following thing which I searched for and found somewhere…! Possibly on WordPress.org. Well, that’s not important. What is important is how to fix this problem?

Look at the script given below. Now what you have to do is to just copy it and paste it in to your .htaccess file located at the root of your website server. Then save the file and that’s all…!

Wait for a couple of minutes and then visit Google’s PageSpeed Insight page. Type in your web address and press the button ‘Analyze’. Presto! You will see that the rank of your website may turn into GREEN.

All the best, friends…!

Paste this code

## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
## EXPIRES CACHING ##

However, I have noticed that when you update something on your website, even some text, or a paragraph, within prepublished post, then there is problem with this code, given above. It does not show the updated content within such posts. This happens when the visitor has not refreshed the page, and continue to watch the page without cleaning up the browser history. This problem can be avoided using following code, in your .htaccess file. Use this code and check the result.

## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType text/css "access plus 1 day"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 day"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 day"
## EXPIRES CACHING ##
By the way, our website http://vsagar.org is performing quite good in Google PageSpeed Insight. Check the following screen shot for the same.
How to rank more in Google PageSpeed Insight?

Check our website’s page speed in Google page speed tester