POST 转换后在页面上使用 window.history.replaceState 重写后重新加载的正确规范是什么?
首先,请参阅下面的浏览器之间的差异。
- google chrome
- /himenon/history_pushstate-reload-bugs#firefox“ rel =“ nofollow noreferrer”> firefox
- Safari
提供了两种类型的POST目标端点/register
和/register-history-Push-STATE
执行以下JavaScript。
/寄存器 | /register-history-push-state |
---|---|
” “ rel =“ nofollow noreferrer”> |
window.history.replaceState("", "", "/register-history-push-state");
如果您在过渡后重新加载页面,请您会看到重新加载上的HTTP方法不同,如下所示,
重新加载http方法(不是Exec替换) | 重新加载http方法(EXEC替换) | |
---|---|---|
chrome | post post | get get |
firefox | > firefox | get |
safari | post | post |
url和历史更新步骤在这里找不到清楚地说明。
正确的浏览器规范是哪种行为模式?
First, see the differences between browsers below.
Two types of POST destination endpoints /register
and /register-history-push-state
are provided, but the essential difference is whether or not the following JavaScript is executed.
/register | /register-history-push-state |
---|---|
![]() | ![]() |
window.history.replaceState("", "", "/register-history-push-state");
If you reload the page after the POST transition, you will see that the HTTP Method on reload is different, as follows
Reload HTTP Method(NOT exec replaceState) | Reload HTTP Method(exec replaceState) | |
---|---|---|
Chrome | POST | GET |
Firefox | POST | GET |
Safari | POST | POST |
The specification of url and history update steps does not clearly state here Not found.
Which pattern of behaviour is the correct browser specification?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论