英文:
What is the correct error code for timeout?
问题
在错误页面中,您可以使用HTTP状态码"408 Request Timeout"(请求超时)来表示页面超时。这将向用户传达页面超时的信息,因为您希望出于安全目的添加超时功能,这个状态码是一个合适的选择。
英文:
I am developing a website and it will display a page for 5 minutes and user will be redirected to an error page which ask them to refresh the page. What status code should I put in the error page?
I am expecting the suitable error code to be displayed in the error page.
Edit: The page is displaying sensitive information so I want to add a timeout for security purpose.
答案1
得分: -1
你可以在这里找到HTTP响应代码:https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses
根据你的操作,可能会发送408(请求超时)或504(网关超时)的代码。
如果你能更详细地解释一下你的问题,我们可能能够提供更好的指导。祝一切顺利。
英文:
You can find HTTP response codes here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses
Depending of what are doing, you might send a code 408 (request time) or 504 (gateway timeout)
If you explain a bit more of your problem, it might be possible to give you better orientation. Regards
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论