PAGESPEED ​​INSIGHTS (GOOGLE)


Wordpress Optimization with PageSpeed ​​Insights

I will return to this article on how I optimized this site to get the best score possible with PageSpeed ​​Inisights. The starting note is 50/100 in mobile version and 59/100 in computer version. In 5 minutes of configuration I get a score of 79/100 for mobile and 93/100 for desktop! In short I did not expect such a progression.

Install mod_pagespeed for apache 2

For starters I installed the mod_pagespeed on apache on the server in question. Nothing but the installation will provide these first results, but not necessarily those expected ... 
We go from 50/100 in mobile to 60/100 or 10% progression a 2 minutes just huge!
On the computer version cons I lose 2 points  from 59/100 to 57/100. The settings are long and complicated.

Problem with the theme ...

Quickly the theme shows these first flaws ... First, loading a logo resource even if it is not used ... But that's just a point on the desktop version of penalty. The other problem is the use of @import in the css. And there I quickly realize mod_pagespeed does not know how to manage them and suddenly it only loads the main sheet ... So I had to pass all the imports in the order in the sheet of the child theme.
Once this problem is solved, the performance is impressive! The rating goes from 59 in desktop to 93 on Pagespeed Insights! The mobile version goes up to 79!
It remains to make the most complicated javascript defer and CSS opt-ins ...

From the long test to try mod_pagespeed options

I did a lot of testing with the various options mod_pagespeed offers. But in the end I only retained the first filters I had set up. Some like the defer de javascript consumes too much resource and dropped the score to less than 50 on mobile and desktop ... However, I had other problems that I could not correct: the inability to mod_pagespeed to combine all stylesheets into one ... But I do not give up I would find the why, first track the version of apache or the fact of not compiling mod_pagespeed on the server ...

Active rules

Here are the few filters I activated to achieve these performances:
<IfModule pagespeed_module> 
ModPagespeed on
ModPagespeedEnableFilters rewrite_css, rewrite_javascript 
ModPagespeedEnableFilters collapse_whitespace, elide_attributes 
ModPagespeedEnableFilters extend_cache, convert_meta_tags
</ IfModule>

Maintain performance

This is the first step is taken, now remains to keep them. Because I have some plugin to install and inevitably it goes in my opinion inevitably degrade performance. This maintenance will be done by other corrections and mod_pagespeed can not in my opinion not help me more in this 100/100.

Related Posts

Post a Comment

Subscribe Our Newsletter