• 缓存问题


    网页图片在微信加载的时候位置偏移。 最后找到原因之前调试的时候图片位置没定好,加载时访问缓存所以偏移 在html头部加上

    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidat>

    解释

    <!--
        The "expires" "http-equiv" meta-tag can be used to control
        the cacheing of pages with Netscape 3.0 and later browsers.
        The 'content="0"' form tells the browser to not cache the
        page 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 introduced
        in the HTTP/1.1 specification.  Not all browsers or proxy
        agents may support these operations.  To be safe you may
        want 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 in
        the HTTP/1.1 specification.  The allowed "content" values
        include:
        * 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 archived
        
        Cache-Control modifiers include:
        * no-transform - proxy servers are not allowed to transform
          the cached data.
        * must-revalidate - proxy servers and other caching mechanisms
          must revalidate the original file each time the file is
          accessed.
        * proxy-revalidate - same as must-revalidate, but it only
          applies to proxy servers.
        * max-age=<seconds> - client/browser is willing to accept
          a page that is more recent than the number of seconds
          indicated.
        * s-maxage=<seconds> - same as max-age but applies to shared
          proxy servers and other shared caching mechanisms.
        
        The directive CACHE-CONTROL:NO-CACHE indicates cached
        information should not be used and instead requests should
        be forwarded to the origin server. This directive has the
        same 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 with
        a 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 from
        their indexes based on the "expires" meta-tag.  This
        implies that pages that identify a 'content="0"' form may
        not be indexed at all.
    -->

    有时间看看http协议

    7.28发现加meta也没有什么卵用,缓存还是要删了微信重新安装

  • 相关阅读:
    How to configure SQL 2005 Database Mail
    Restore DataBase後執行以下語句.txt
    安装Sql Server 2005出现“性能监视器计数器要求”错误解决方法
    无法对视图创建 索引,因为该视图未绑定到架构
    2D Barcode相關源碼 (Object C)
    row_number()
    最大边与最小边差最小的最小生成树——pku3522
    最小生成树计数——JSOI2008
    STL map 简单的应用
    最大生成树kruskal——pku3723
  • 原文地址:https://www.cnblogs.com/cyanqq/p/4615360.html
Copyright © 2020-2023  润新知