Tuesday, 7 January 2020

How to Deal with Leverage Browser Caching on Blogger

How to Deal with Leverage Browser Caching on Blogger

How to Deal with Leverage Browser Caching on Blogger
Tuesday, 7 January 2020

How to Deal with Leverage Browser Caching on Blogger


The problem that often appears faced by bloggers is the speed of the site. the problem arises because of several things like optimize images, minify javascript and leverage browser caching. Now on this occasion Arlina Design will share how to overcome browser leverage caching on Blogger ?

This problem is often encountered when we check the speed of the blog through the GTMetrix or Google PageSpeed ​​Insights tool Because browser caching leverage is also one of the determinants of blog loading speed, the faster the blog loading, the higher the blog traffic. An example of leverage browser caching is like the picture below when I check the www.shekhnilesh.com site on Google PageSpeed ​​Insights.

Simply put Leverage browser caching functions to set the expiration date or the maximum age of HTTP / HTTPS headers that are directly related to source code such as CSS, Javascript and static images. So instruct the browser to load the Source Code that has been downloaded earlier from local storage.

How to Deal with Leverage Browser Caching on Blogger


Step One, to overcome browser caching leverage, open the Blogger Dashboard then select Theme> Click the Edit HTML button and add the code below just below <head>

<include expiration='7d' path='*.css'/>
<include expiration='7d' path='*.js'/>
<include expiration='3d' path='*.gif'/>
<include expiration='3d' path='*.jpeg'/>
<include expiration='3d' path='*.jpg'/>
<include expiration='3d' path='*.png'/>

Once added, save the theme. 

For WordPress users, you can use this code. Access the .htaccess file on the Public Html WordPress web hosting and add the code below

## EXPIRES CACHING ##
<IfModule mod_expires.c>
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"
</IfModule>
## EXPIRES CACHING ##

Usually takes approximately one week after installation, then check the site again at GTMetrix or Google PageSpeed ​​Insights
That is one way to speed up loading your blog, by having a good blog speed it will be able to add blog traffic. 

Thus, How to Overcome Browser Caching Leverage on Blogger, hopefully useful. Wassalam.
How to Deal with Leverage Browser Caching on Blogger
4/ 5
Oleh

Comments