发布表单数据
我有一个 HTML 表单,我想发布数据,然后向用户显示一些文本。我听几个人讨论过这个想法:
用户是否应该从[表单页面] -> 转到[表单页面]? [处理表单post页面]-> [显示页面] 还是用户应该直接转到组合的[表单页面] -> [处理表单/显示页面]
我听说过前者更安全,而后者重定向更少。
有哪些答案?
I have an HTML form which I want to post data to then display some text to the user. I've heard several people discuss this idea:
should the user go from [form page] -> [processing form post page] -> [display page] or should the user just go to a combined [form page] -> [processing form / display page]
I've heard arguments the former is more secure while the latter is less redirects.
What are some answers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(2)
为了避免缓存问题、重新提交刷新问题和类似问题:使用 POST-REDIRECT-GET 模式。
To avoid caching issues, resubmission on refresh issues and similar problems: Use the POST-REDIRECT-GET pattern.
根据您提出的问题,您可以只拥有 [form page] -> [要处理和显示的表单页面]。
From what your question asked, you could just have the [form page] -> [form page to process and display].