http - 浏览器的永久 HTTP 重定向

标签 http browser

如果您设置永久 HTTP 重定向(301 状态),那么浏览器是否每次仍会访问旧链接并获得重定向响应,或者它们是否会更好地了解并在执行请求之前在本地更改请求 URL?

最佳答案

不能保证,但他们应该缓存它,并且在实践中经常这样做。

来自spec :

The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.

关于http - 浏览器的永久 HTTP 重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10038001/

相关文章:

python - HttpResponseForbidden 和 handler403

java - 如何在 play 框架中从 ws 客户端流式传输 301 重定向

Http header -缓存控制 : max-age - behaviour?

javascript - 为什么 NodeJS/restify 服务器*很少*在接受时报告 EPERM?

javascript - 影子 DOM : what is shadow Dom and How to edit something inside it

jquery - 将内容移出浏览器区域

css - 浏览器作为设计工具 - 更改颜色,保存它们?

html - 镜像 HTML 页面打印

C - 套接字,分离数据和http header ?

某些浏览器中的 HTML/CSS 边距问题