更新时间:2023-02-24 08:40:28
唯一的方法是在历史对象上使用新的 HTML 5 功能:
The only way to do it is with a new HTML 5 feature on the history object:
window.history.replaceState("Replace", "Page Title", "/mypage");
否则,您将需要使用 POST 或使用 cookie 重新加载页面以隐藏查询参数.
Otherwise you'll need to use POST or reload the page with cookies to hide the query parameters.