重复混合多个表单提交

huangapple go评论46阅读模式
英文:

Remix multiple form submissions

问题

我有一个表单,多次提交后,在网络选项卡中看到已取消的请求,但仍在操作函数中收到它们。我是否漏掉了什么?这是否是正确的行为?

英文:

I have a form that upon submitting multiple times, I see in the network tab the cancelled requests. but I still receive them in the action function.
Am I missing something? Is this the right behavior?

答案1

得分: 1

当一个fetch请求(Remix在底层使用)被中止时,它只是取消了响应的处理。它不会阻止服务器处理该请求。您应确保您的服务器能够处理多个发送的请求。

英文:

Yes, when a fetch request (which Remix uses under the hood) is aborted, it simply cancels the processing of the response. It does not stop the server from processing that request. You should make sure your server can handle multiple requests being sent.

huangapple
  • 本文由 发表于 2023年5月21日 22:12:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76300321.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定