How to Overcome Browser Caching Leverage on Blogger/WordPress - Onet4u Tech
Dark
News Update
Loading...

How to Overcome Browser Caching Leverage on Blogger/WordPress

How to Overcome Browser Caching Leverage on Blogger/WordPress
HYE..
When I checked the speed of my blog on PageSpeed Insight, I was quite surprised to see the results. My blog loading speed is classified as yellow (need work).
How to Overcome Browser Caching Leverage on Blogger/WordPress

PageSpeed Insights measures two things, namely:

  • loading time above half, which is the time it takes the browser to render the above the fold content since the user requests a new page.
  • the full page loading time, which is the time it takes the browser to render the full content since the user requests a new page.

However, PageSpeed Insights only considers the performance aspects of pages that are not network related because network connection performance varies greatly. 

The indicators considered are server configuration, HTML structure of the page, and use of external resources such as images, JavaScript, and CSS.

Well, that's a brief description of PageSpeed Insight.

From the results of the PageSpeed Insight analysis, suggestions for improvement will appear to speed up loading the blog. One of the suggested improvements that will be encountered might be Leverage Browser Caching PageSpeed Insight.

After I searched several sources and applied it, I finally found a way that was quite effective.
 The way I do it is as follows:

Copy the following code below the code <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'/>
The first way is to add the code below into .htaccess in WordPress. Open the Cpanel website, open the file manager and select Public Html and edit the .htaccess file add the following code:
<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 ##
Simple enough right? If it doesn't work, please ask in the comments column. Good ... Hopefully useful That is all and thank you.
dottycat
“Don’t try to plan everything out to the very last detail. I’m a big believer in just getting it out there: create a minimal viable product or website, launch it, and get feedback.”

RELATED POSTS

COMMENT

Load Comments

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel