推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
jasya

关于url变化,保证页面有不可变的东西

  •  
  •   jasya · Jun 9, 2013 · 4339 views
    This topic created in 4745 days ago, the information mentioned may be changed or developed.
    RT
    如下网站,在页面上点击了other user的主页,url发生了变化,但是音乐一直在坚持播放

    就连游览器的后退按钮也没中断音乐的播放

    https://soundcloud.com/hondajojo

    我知道的music.qq.com 是通过#锚点的变化,iframe加载页面,

    但是soundcloud的效果酷多了.直接是url的地址变化了..

    望指教
    8 replies    1970-01-01 08:00:00 +08:00
    airyland
        1
    airyland  
       Jun 9, 2013
    html5 history
    explon
        2
    explon  
       Jun 9, 2013
    用的类似 Gmail 那种 ajax, 页面没有被刷新
    explon
        3
    explon  
       Jun 9, 2013
    用 firebug 改一下页面元素就知道了
    jasya
        4
    jasya  
    OP
       Jun 9, 2013
    @explon 是ajax的请求但是url发生了变化 /test到/test1 类似,url发生了变化就应该页面全部刷新了吧=/=

    @airyland 去看看
    citydog
        5
    citydog  
       Jun 9, 2013
    头像,我想歪了,面壁去~~
    jerry
        6
    jerry  
       Jun 9, 2013   ❤️ 1
    html5 history pushstate接口: http://html5demos.com/history
    DaniloSam
        7
    DaniloSam  
       Jun 9, 2013   ❤️ 1
    html5 history pushstate

    可以google: pjax
    jasya
        8
    jasya  
    OP
       Jun 10, 2013
    @DaniloSam
    @jerry 非常感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1073 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 18:19 · PVG 02:19 · LAX 11:19 · JFK 14:19
    ♥ Do have faith in what you're doing.