我要在我的网站上测试PageSpeed的速度,它发现我的网站速度慢了很多,

我得试试这里怎么说,但没什么要改变的.
我的网站有SSL,https://linuxusers.net
我有我的.htaccess文件添加,
# BEGIN Expires
<ifModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</ifModule>
# END Expires但没什么改变..。
谁能简单地解释一下我(我不是网页设计师)话怎么会输掉这个问题,谢谢!
发布于 2019-07-16 12:20:41
您的屏幕截图与“缓存来自图像的短寿命”无关。谷歌发出的警告是关于HTTPS的。您应该从您的主机或第三方获得一个SSL证书,该证书是可以免费或付费的。
当涉及到“从图像短暂生存期缓存”时,如果您可以访问.htaccess文件(通常放在根目录中),您可以这样做:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
https://webmasters.stackexchange.com/questions/124008
复制相似问题