从 Google PageSpeed Insights 扫描页面时产生警告: Consider Fixing: Leverage browser c-6ren">
gpt4 book ai didi

javascript - 根据 Google PageSpeed Insights 建议,利用 maps.googleapis 浏览器缓存

转载 作者:行者123 更新时间:2023-11-30 00:00:56 31 4
gpt4 key购买 nike

以下脚本:

<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 启动

关于javascript - 根据 Google PageSpeed Insights 建议,利用 maps.googleapis 浏览器缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40560788/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com