google-maps - Google PageSpeed 要求我对由 Google 托管的文件启用压缩

标签 google-maps compression gzip pagespeed

在嵌入了 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。大家有什么意见或建议吗?

enter image description here

最佳答案

你不能对外部资源做任何事情,你这边已经优化过了

关于google-maps - Google PageSpeed 要求我对由 Google 托管的文件启用压缩,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21212950/

相关文章:

javascript - 如何在谷歌地图上绘制数百万个点?

ios - 可以在 GMSPanoramaView 中为 GMSMarkers 设置动画

C - 用于商业用途的良好差分压缩库?

java - 递归字符串解压

Python:从标准输入读取gzip

google-maps - 绕过Google Geocoding API IP速率限制

java - Android Google Maps Api v2 fragment : NullPointerException error

windows - 使用 Powershell 或命令行在 Windows 中创建压缩文件夹

java.util.zip.ZipException : oversubscribed dynamic bit lengths tree

python - 将大文件从 URL 直接流式传输到 gzip 文件