Leverage Browser caching is an important parameter to speed up your site/blog and that google and y-slow used to analyze the performance of your site/blog. If you will check your site/blog on Google PageSpeed, you will find out that recommended that you have to leverage browser caching to make your site more fast then it is.
Table of Contents
What Is Browser Caching?
When you visit any site/blog the on first opening that URL, your PC download all there content in your cache. So on going next page of that site’s, your PC browser first pick all the data that is in your cache and that are on that page too like images, javascript, css, favicon, header, footer, sidebar, widget etc. The end result is your webpage will appear to load faster in user’s browser. This process is called browser caching.
Why Leverage Browser Caching?
Caching your website resources on the visitor’s computer will let them load your pages faster every time they come back to your site. If the resources are static, it is suitable for the contents that never or rarely need to be updated. This includes jpg, gif, png, favicon, javascript, css, etc. Google recommends that the static resources are cached at least once in a month. This is done by setting the maximum age or expiry date for the resource in the HTTP headers.
Setting an expiry date or maximum age in the HTTP headers for static resources (images, js, css, etc) instructs the browser to load previously downloaded resources from local disk rather than over the network. (source -Google)
Features Of Leverage Browser Caching:
- Minimize the number of HTTP requests.
- Reduce the load time of your site dramatically.
- Save your visitor’s load time.
- Save your visitor bandwidth and data if they visit your site more than once.
- Reduces the load on your web server and save bandwidth.
You Can Do Leverage Browser Caching On:
- images: jpg, gif, png
- favicon/ico
- javascript
- css
You Can Use Leverage Browser Caching Limits Using:
- years
- months
- weeks
- days
- hours
- minutes
- seconds
## EXPIRES CACHING ## ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" ## EXPIRES CACHING ##
Final Words:
Did you notice any improvements to your site? Did the above take care of all your files listed under “Leverage browser caching” and “Add Expires headers“? Let me know in the comments below. Be aware that the is placed well in your document. Rest all is in your hand if you want to customize it or play with it. That’s all we have. If you have any problem with this code in your template then feel free to contact us with a full explanation of your problem. We will reply to you as time allowed to us. Don’t forget to share this with your friends so they can also take benefit from it and leave.
you have written such a useful articles which is providing good information thanks a so much
Welcome Here And Thanks For Liking Our Article, Be With Us So You Will Get More Like This…
Thanks for the complete process and tips buddy. Just applied your code and woillla ! Google Web Master tool no longer shows the error while measuring my blog’s Page Speed. Worthy article.
Welcome here and thanks for liking our article. Stay with us to get more like this…
This is what i was looking for long time
Welcome here and thanks for liking our article.
This website has been so good to generate codes of steam wallet online.
Welcome here and thanks for reading our codes and sharing your views.
Fine to see the quality information introduced in an easy and understanding way.
Welcome here and thanks for reading our article and sharing your views..