fengge516
V2EX  ›  问与答

大神们,关于浏览器缓存的问题,谁能帮我解决一下啊,跪求答案。

  •  
  •   fengge516 · Dec 2, 2015 · 2450 views
    This topic created in 3846 days ago, the information mentioned may be changed or developed.

    问题是这样的,当我访问一个页面以后,会缓存一部分内容,当服务器端更新这个内容以后,如何让浏览器不清除缓存就自动加载新的内容。其实问题无非就是浏览器自动加载服务器端更新的内容。

    7 replies    2015-12-02 22:07:07 +08:00
    virusdefender
        1
    virusdefender  
       Dec 2, 2015
    版本号
    cxe2v
        2
    cxe2v  
       Dec 2, 2015
    加个时间戳参数
    fengge516
        3
    fengge516  
    OP
       Dec 2, 2015
    @cxe2v 能详细些么,加在哪里
    cxe2v
        4
    cxe2v  
       Dec 2, 2015
    @cxe2v 加在 URL 最后 url?param1=value1&v=时间戳
    fengge516
        6
    fengge516  
    OP
       Dec 2, 2015
    谢谢各位牛人
    LEFT
        7
    LEFT  
       Dec 2, 2015 via iPhone
    改文件名

    cache-control 用 must-revalidate proxy-revalidate
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3004 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 06:56 · PVG 14:56 · LAX 23:56 · JFK 02:56
    ♥ Do have faith in what you're doing.