根据 Google PageSpeed Insights 建议,利用 maps.googleapis 浏览器缓存
Leveraging maps.googleapis browser caching, as per Google PageSpeed Insights advice
以下脚本:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<my-key>&libraries=places"></script>
从 Google PageSpeed Insights 扫描页面时产生警告:
Consider Fixing:
Leverage browser caching Setting an expiry date or a maximum age in the HTTP headers for static resources instructs
the browser to load previously downloaded resources from local disk
rather than over the network. Leverage browser caching for the
following cacheable resources:
https://maps.googleapis.com/…&libraries=places
(30 minutes)
如何利用浏览器缓存从 30 分钟到更长的时间?
使用来自您服务器的 CURL php 启动它
以下脚本:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<my-key>&libraries=places"></script>
从 Google PageSpeed Insights 扫描页面时产生警告:
Consider Fixing:
Leverage browser caching Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network. Leverage browser caching for the following cacheable resources:
https://maps.googleapis.com/…&libraries=places
(30 minutes)
如何利用浏览器缓存从 30 分钟到更长的时间?
使用来自您服务器的 CURL php 启动它