phpyii2pagespeed

Can't resolve Google pagespeed "Enable compression" point using Yii2


Having trouble trying to improve the Google pagespeed score and says I need to enable compression with a 70% improvement on the JS file for example but I can't make the same improvement at all!

I have GZIP enabled and use the apache mod_deflate to do so.

I use the HTML5 boiler plate htaccess file.

I tried manually compressing the JS file but can only reach 25%. CSS is even less yet states i can save 80%.

Any thoughts?

ps. I'm working on the other issues too, wanna get that 99 score.


Solution

  • You do have GZIP enabled for some items but if you follow the link to your js you will see that this resource is not being zipped up.

    http://checkgzipcompression.com/?url=http%3A%2F%2Fburghleys.com%2Fminify%2Fb329b2d2ce53b5c6be05decfe5e5d723527a666e.js

    Add the following line to your .htaccess

    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/xml application/xhtml+xml application/rss+xml application/javascript appliction/x-javascript