设为首页 收藏本站
查看: 905|回复: 0

[经验分享] IIS HTML, CSS, Script, 图片等静态文件不更新问题

[复制链接]

尚未签到

发表于 2015-8-14 08:11:56 | 显示全部楼层 |阅读模式
文件已经更新到站点,但客户端访问仍然没有更新,主要是各种静态文件。
网关代理服务器缓存的可能性比较大,应该先检查这个原因。
代理服务器缓存还有一些其它表现,本地访问可以看到更新的效果;同一个网段、IE设置局域网访问不走代理,也能看到更新效果;客户端直接使用url访问静态文件(html页面、css文件、脚本等),获取到的是未更新的,在服务器上更新文件名字,客户端使用新的文件名访问,能够获取到更新后的文件。


Tag NameExample(s)DescriptionAuthor<META NAME="AUTHOR" CONTENT="Tex Texin">The author's name.cache-control<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.
Public - may be cached in public shared caches
Private - may only be cached in private cache
no-Cache - may not be cached
no-Store - may be cached but not archived  The directive CACHE-CONTROL:NO-CACHE indicates cached information should not beused and instead requests should be forwarded to the origin server. This directivehas the same semantics as the PRAGMA:NO-CACHE.
Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cacherequest is sent to a server not known to be HTTP/1.1 compliant.
Also see EXPIRES.
Note: It may be better to specify cache commands in HTTP than in META statements,where they can influence more than the browser, but proxies and other intermediariesthat may cache information.
Content-Language<META HTTP-EQUIV="CONTENT-LANGUAGE"
CONTENT="en-US,fr">Declares the primary natural language(s) of the document. May be used by searchengines to categorize by language.CONTENT-TYPE<META HTTP-EQUIV="CONTENT-TYPE"
CONTENT="text/html; charset=UTF-8">The HTTP content type may be extended to give the character set. It is recommendedto always use this tag and to specify the charset.Copyright<META NAME="COPYRIGHT" CONTENT="&copy; 2004 Tex Texin">A copyright statement.DESCRIPTION<META NAME="DESCRIPTION"
CONTENT="...summary of web page...">The text can be used when printing a summary of the document. The text should notcontain any formatting information. Used by some search engines to describe yourdocument. Particularly important if your document has very little text, is a frameset,or has extensive scripts at the top.EXPIRES<META HTTP-EQUIV="EXPIRES"
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">The date and time after which the document should be considered expired. An illegalEXPIRES date, e.g. "0", is interpreted as "now". Setting EXPIRES to 0 may thus beused to force a modification check at each visit.
Web robots may delete expired documents from a search engine, or schedule a revisit.  HTTP 1.1 (RFC2068) specifies that all HTTP date/time stamps MUST be generated in GreenwichMean Time (GMT) and in RFC 1123 format.
RFC 1123 format = wkday "," SP date SP time SP "GMT"

wkday = (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
date = 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59
month = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)
Keywords<META NAME="KEYWORDS"
CONTENT="sex, drugs, rock & roll">The keywords are used by some search engines to index your document in additionto words from the title and document body. Typically used for synonyms and alternatesof title words. Consider adding frequent misspellings. e.g. heirarchy, hierarchy.PRAGMA NO-CACHE<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">This directive indicates cached information should not be used and instead requestsshould be forwarded to the origin server. This directive has the same semanticsas the CACHE-CONTROL:NO-CACHE directive and is providedfor backwards compatibility with HTTP/1.0.
Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cacherequest is sent to a server not known to be HTTP/1.1 compliant.
HTTP/1.1 clients SHOULD NOT send the PRAGMA request-header. HTTP/1.1 caches SHOULDtreat "PRAGMA:NO-CACHE" as if the client had sent "CACHE-CONTROL:NO-CACHE".
Also see EXPIRES.Refresh<META HTTP-EQUIV="REFRESH"
CONTENT="15;URL=http://www.I18nGuy.com/index.html">Specifies a delay in seconds before the browser automatically reloads the document.Optionally, specifies an alternative URL to load, making this command useful forredirecting browsers to other pages.ROBOTS<META NAME="ROBOTS" CONTENT="ALL">

<META NAME="ROBOTS" CONTENT="INDEX,NOFOLLOW">

<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW">

<META NAME="ROBOTS" CONTENT="NONE">CONTENT="ALL | NONE | NOINDEX | INDEX| NOFOLLOW | FOLLOW | NOARCHIVE"
default = empty = "ALL"
"NONE" = "NOINDEX, NOFOLLOW"  The CONTENT field is a comma separated list:
INDEX: search engine robots should include this page.
FOLLOW: robots should follow links from this page to other pages.
NOINDEX: links can be explored, although the page is not indexed.
NOFOLLOW: the page can be indexed, but no links are explored.
NONE: robots can ignore the page.
NOARCHIVE: Google uses this to prevent archivingof the page. See http://www.google.com/bot.html
GOOGLEBOT<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">In addition to the ROBOTS META Command above, Google supportsa GOOGLEBOT command. With it, you can tell Google that you do not want the pagearchived, but allow other search engines to do so. If you specify this command,Google will not save the page and the page will be unavailable via its cache.
See Google'sFAQ.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-98691-1-1.html 上篇帖子: server 2008 IIS 7下asp.net开发环境部署及配置 下篇帖子: 解决安装IIS时提示找不到zClientm.exe文件的问题
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表