将缓存控制设置为外部资源? [英] set cache-control to external resources?

查看:118
本文介绍了将缓存控制设置为外部资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@ tools.pingdom.com由于这些资源,我在杠杆缓存控制中收到警告:

@tools.pingdom.com I get a warning in leverage cache-control because of these resources:

http://code.jquery.com/jquery-1.6.2.min.js
http://www.google-analytics.com/ga.js
http://edge.sharethis.com/images/spinner.gif
http://w.sharethis.com/button/buttons.js

哪些不在我的主人。

我该怎么办?

这是开始我的htaccess:

This is the beginning of my htaccess:

# 480 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>

# 1 weeks
<FilesMatch "\.(js)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>


推荐答案

您无法控制从服务器发送的标头你无法控制。

You can't control the headers sent from a server that you don't control.

换句话说,要么自己主持一个副本,要么你无能为力。

In other words, either host a copy yourself or there's nothing you can do about it.

这篇关于将缓存控制设置为外部资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆