在嵌入了 Google map 的页面上运行 Page Speed 测试时,我得到了这个:
Should Fix: Enable compression Compressing resources with gzip or deflate can reduce the number of bytes sent over the network. Enable compression for the following resources to reduce their transfer size by 136.4KiB (67% reduction). Compressing https://maps.google.com/…95,0.006295&z=10&output=embed&iwloc=near could save 135.3KiB (67% reduction). Compressing https://maps.google.com/…=kEXbUrP4JNGygQSk7ICgAw&hl=en&country=us could save 1.1KiB (71% reduction).
移除 map 后,该页面在移动设备和桌面设备上的得分均为 99/100,但包含 map 后则降至 85/100 和 87/100。如果谷歌不遵循它自己的资源压缩建议,那将是非常奇怪的。根据我对此事的理解(这是有限的),启用此功能的唯一方法是通过托管文件的服务器上的 .htaccess。大家有什么意见或建议吗?
最佳答案
你不能对外部资源做任何事情,你这边已经优化过了
关于google-maps - Google PageSpeed 要求我对由 Google 托管的文件启用压缩,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21212950/