fengge516
V2EX  ›  问与答

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

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

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

    7 replies  •  2015-12-02 22:07:07 +08:00
    virusdefender
    virusdefender
    Dec 2, 2015
    1
    版本号
    cxe2v
    cxe2v
    Dec 2, 2015
    2
    加个时间戳参数
    fengge516
    fengge516
    OP
    Dec 2, 2015
    3
    @cxe2v 能详细些么,加在哪里
    cxe2v
    cxe2v
    Dec 2, 2015
    4
    @cxe2v 加在 URL 最后 url?param1=value1&v=时间戳
    fengge516
    fengge516
    OP
    Dec 2, 2015
    6
    谢谢各位牛人
    LEFT
    LEFT
    Dec 2, 2015 via iPhone
    7
    改文件名
    或
    cache-control 用 must-revalidate proxy-revalidate
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4776 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 01:41 · PVG 09:41 · LAX 17:41 · JFK 20:41
    ♥ Do have faith in what you're doing.