[英]Can't resolve Google pagespeed “Enable compression” point using Yii2
Site in question is http://burghleys.com/ 有问题的网站是http://burghleys.com/
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! 尝试提高Google Pagespeed得分时遇到了麻烦,并说我需要启用JS文件,例如,对JS文件进行70%的改进,但是我根本无法实现相同的改进!
https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fburghleys.com%2F https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fburghleys.com%2F
I have GZIP enabled and use the apache mod_deflate to do so, tested as per http://checkgzipcompression.com/?url=http%3A%2F%2Fburghleys.com%2F 我已启用GZIP,并使用apache mod_deflate进行了此操作,并根据http://checkgzipcompression.com/?url=http%3A%2F%2Fburghleys.com%2F进行了测试
I use yii2 https://github.com/rmrevin/yii2-minify-view plugin to compress my files which generally works really well. 我使用yii2 https://github.com/rmrevin/yii2-minify-view插件压缩我的文件,通常效果很好。
I use the HTML5 boiler plate htaccess file. 我使用HTML5样板htaccess文件。
I tried manually compressing the JS file but can only reach 25%. 我尝试手动压缩JS文件,但只能达到25%。 CSS is even less yet states i can save 80%. CSS甚至更少,但我可以节省80%。
Any thoughts? 有什么想法吗?
ps. ps。 I'm working on the other issues too, wanna get that 99 score. 我也在研究其他问题,想要获得99分。
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. 您确实为某些项目启用了GZIP,但是如果您单击指向js的链接,则会看到此资源未压缩。
http://checkgzipcompression.com/?url=http%3A%2F%2Fburghleys.com%2Fminify%2Fb329b2d2ce53b5c6be05decfe5e5d723527a666e.js http://checkgzipcompression.com/?url=http%3A%2F%2Fburghleys.com%2Fminify%2Fb329b2d2ce53b5c6be05decfe5e5d723527a666e.js
Add the following line to your .htaccess
.htaccess
下行添加到您的.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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.