POST 转换后在页面上使用 window.history.replaceState 重写后重新加载的正确规范是什么?

发布于 2025-01-17 18:06:21 字数 2152 浏览 2 评论 0原文

首先,请参阅下面的浏览器之间的差异。

提供了两种类型的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替换)
chromepost postget get
firefox> firefox 发布get
safaripostpost

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
enter image description hereenter image description here
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)
ChromePOSTGET
FirefoxPOSTGET
SafariPOSTPOST

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文