Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pushstate存在实现上的bug #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

memoryza
Copy link
Contributor

@memoryza memoryza commented Jul 1, 2015

No description provided.

@cssmagic
Copy link

cssmagic commented Jul 1, 2015

不建议在 Android 2.3 下使用 HTML5 History API,因为 bug 太多,缺乏实用性。

另外,Android 直到 4.4 才开始支持 history.state 属性,详见 history.state 项目

@memoryza
Copy link
Contributor Author

memoryza commented Jul 1, 2015

ok

@memoryza
Copy link
Contributor Author

memoryza commented Jul 1, 2015

history.state.js 为啥两次检测replacestate是不是错了
function _hasHistoryAPI() {
return 'onpopstate' in window &&
'replaceState' in history && typeof history.replaceState === 'function' &&
'replaceState' in history && typeof history.replaceState === 'function'
}

@cssmagic
Copy link

cssmagic commented Jul 1, 2015

谢谢,确实写错了。欢迎提 PR 呀!

@memoryza
Copy link
Contributor Author

memoryza commented Jul 1, 2015

我大概看了一下代码,顺便请教一个问题,百姓网在不支持pushstate的浏览器做SPA依旧是利用hash嘛?
如果是用hash如何做到同一个网址手机和pc访问展现不一样(我看到访问一个网址server端产生过一次强跳转),是利用前端路由嘛。

@cssmagic
Copy link

cssmagic commented Jul 1, 2015

@memoryza
如有疑问请到 history.state 项目 提 issue 吧。我们在这里讨论不太合适。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants