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
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.
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.
What's going on here?
Yes. RFC 2616 Section 4.2 "Message Headers" says: Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)].
Defines a time interval for the document to refresh itself. Example: <meta http-equiv="refresh" content="300"> Note: The value "refresh" should be used carefully, as it takes the control of a page away from the user. Using "refresh" will cause a failure in W3C's Web Content Accessibility Guidelines.
HTML allows for the specification of meta information within META tags. A popular use of this technique involves specifying redirections or page reloads within HTML code, rather than relying on HTTP headers to do so (for example, HTTP status code 302 Document moved for redirections).
HTTP headers let the client and the server pass additional information with an HTTP request or response. An HTTP header consists of its case-insensitive name followed by a colon ( : ), then by its value. Whitespace before the value is ignored.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With