“刷新"HTTP 标头 [英] 'Refresh' HTTP header

查看:40
本文介绍了“刷新"HTTP 标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在自动化一个 Web 应用程序(Mantis 错误跟踪器),我从中得到了一个有趣的响应标头,称为 Refresh:

I'm automating a web application (the Mantis bug tracker) and I'm getting an interesting response header from it, called Refresh:

HTTP/1.x 200 OK
...
Refresh: 0;url=my_view_page.php

它的作用似乎与 元刷新 相同,元刷新技术暗示它相当于 HTTP 中的标头.

It seems to be acting the same way that meta refresh does, and the meta refresh technique implies that it is an equivalent of a header in HTTP.

问题是,我在 HTTP 标准或任何其他关于如何解析它以及浏览器在遇到它时应该做什么的权威文档.

Problem is, I can't find any mention of the Refresh header in the HTTP standard or any other definitive documentation on how it should be parsed and what the browser should do when it encounters it.

这是怎么回事?

推荐答案

据我所知,Refresh(连同 Set-Cookie 和可能的其他一些专有伪标头)是 Netscape 在早期创建的互联网并且从那时起基本上(但不完全)标准.因为几乎所有浏览器都支持它,所以使用 Refresh 非常安全——而且通常也是如此.

As far as I know, Refresh (along with Set-Cookie and possibly some other proprietary pseudo-headers) were created by Netscape in the very early days of the internet and have been basically (but not quite) standard since then. Because just about every browser supports it, Refresh is pretty safe to use -- and commonly is.

我想它从来没有成为官方标准的一部分,因为他们已经有了状态代码的规定.

I guess it never became part of the official standards because they already had provisions for that with the status codes.

这篇关于“刷新"HTTP 标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆