V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
fkbd
V2EX  ›  问与答

如何实现不刷新页面,只重新加载一个 js 文件

  •  
  •   fkbd · Aug 17, 2015 · 5397 views
    This topic created in 3916 days ago, the information mentioned may be changed or developed.
    3 replies    2015-08-18 15:13:05 +08:00
    SourceMan
        1
    SourceMan  
       Aug 17, 2015 via Android   ❤️ 1
    remove 掉那个 script ,新建一个 script
    fiffy
        2
    fiffy  
       Aug 17, 2015   ❤️ 2
    @SourceMan 这样应该返回缓存的文件, URL 里需要加参数,比如 http://www.xx.com/xx.js 改为 htttp://www.xx.com/xx.js?time=123456
    chaegumi
        3
    chaegumi  
       Aug 18, 2015   ❤️ 1
    能想到的就是 url 接井号了,可以去看下腾讯分析的后台
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   937 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 20:14 · PVG 04:14 · LAX 13:14 · JFK 16:14
    ♥ Do have faith in what you're doing.