當前位置:
首頁 >
缓存问题
發布時間:2025/5/22
36
豆豆
網頁圖片在微信加載的時候位置偏移。 最后找到原因之前調試的時候圖片位置沒定好,加載時訪問緩存所以偏移 在html頭部加上
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidat>
解釋
<!--The "expires" "http-equiv" meta-tag can be used to controlthe cacheing of pages with Netscape 3.0 and later browsers.The 'content="0"' form tells the browser to not cache thepage at all. --> <meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="Tue, 14 Mar 2000 12:45:26 GMT"> <!--The "pragma no-cache" http-equiv meta-tag was introducedin the HTTP/1.1 specification. Not all browsers or proxyagents may support these operations. To be safe you maywant to specify both expires and pragma in the file. --> <meta http-equiv="pragma" content="no-cache"><!--The "Cache-Control" http-equiv meta-tag was introduced inthe HTTP/1.1 specification. The allowed "content" valuesinclude:* public - may be cached in public shared caches* private - may only be cached in private (client) cache* no-cache - may not be cached* no-store - may be cached but no archivedCache-Control modifiers include:* no-transform - proxy servers are not allowed to transformthe cached data.* must-revalidate - proxy servers and other caching mechanismsmust revalidate the original file each time the file isaccessed.* proxy-revalidate - same as must-revalidate, but it onlyapplies to proxy servers.* max-age=<seconds> - client/browser is willing to accepta page that is more recent than the number of secondsindicated.* s-maxage=<seconds> - same as max-age but applies to sharedproxy servers and other shared caching mechanisms.The directive CACHE-CONTROL:NO-CACHE indicates cachedinformation should not be used and instead requests shouldbe forwarded to the origin server. This directive has thesame semantics as the PRAGMA:NO-CACHE.Clients/Browsers SHOULD include both "pragma no-cache" and"cache-control no-cache" http-equiv meta-tags when used witha server not known to be HTTP/1.1 compliant. --> <meta http-equiv="cache-control" content="no-cache, must-revalidate"><!--Be aware that some search engines will remove pages fromtheir indexes based on the "expires" meta-tag. Thisimplies that pages that identify a 'content="0"' form maynot be indexed at all. -->有時間看看http協議
?
7.28發現加meta也沒有什么卵用,緩存還是要刪了微信重新安裝
?
轉載于:https://www.cnblogs.com/cyanqq/p/4615360.html
總結
- 上一篇: python 调用shell或windo
- 下一篇: CSS知识总结之设计模式(持续学习中)