我在我的PHP网站中添加了google map。现在,我使用Yslow查看我的页面,我在add expired headers中看到:
There are 17 static components without a far-future expiration date.
文件是:
(2014/4/25) http://fonts.googleapis.com/css?...
(2014/4/24) http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/16/9/%7Bcommon,map,util,marker%7D.js
(2014/4/23) http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/16/9/%7Binfowindow%7D.js
(2014/4/23) http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/16/9/%7Bonion%7D.js
(2014/4/23) http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/16/9/%7Bcontrols%7D.js
(1990/1/1) http://maps.googleapis.com/maps/api/js/ViewportInfoService.GetViewportInfo?...
(2014/4/23) http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/16/9/%7Bstats%7D.js
(1990/1/1) http://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?...
(2014/4/25) http://maps.google.com/maps/api/js?...
(2014/4/25) http://maps.gstatic.com/intl/en_us/mapfiles/api-3/16/9/main.js
(2014/4/25) http://maps.gstatic.com/mapfiles/openhand_8_8.cur
(2014/4/25) http://maps.gstatic.com/mapfiles/api-3/images/google_white2.png
(2014/4/25) http://maps.gstatic.com/mapfiles/api-3/images/mapcnt3.png
(2014/4/25) http://maps.gstatic.com/mapfiles/api-3/images/cb_scout2.png
(2014/4/25) http://maps.gstatic.com/mapfiles/arrow-down.png
(2014/4/25) http://maps.gstatic.com/mapfiles/mv/imgs8.png如何为google地图添加过期日期?!
发布于 2014-05-02 01:42:32
您无法更改从Google等其他服务加载的组件的过期日期和缓存设置;您只能真正改进您控制的组件(即从您的服务器)。
在这种情况下,我建议从YSlow度量/等级后退一步,从用户的角度看你的应用程序是否足够快。如果不是这样,那么您可以实现使用Google Maps API的其他最佳实践。
https://stackoverflow.com/questions/23296670
复制相似问题