Last active
July 2, 2021 03:33
-
-
Save laggage/d82eebef5c322d59bf141b6a60b17c55 to your computer and use it in GitHub Desktop.
js更新浏览器地址栏但是不刷新页面
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
// 更新浏览器地址栏但是不刷新页面 | |
window.history.pushState( | |
{}, | |
document.title, | |
window.location.origin + '?v=2') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment