ex) 307 temporary redirect
so many new status codes
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
-1
This is a server feature, not a browser feature.
Hm okay, but what would this data do on caniuse? A lone 301 or 308 won't do anything without also sending a Location header. A search bot will differentiate between a 301/308 and a 302/307, but what should a browser do?
In other words, let's say caniuse implements a compatibility table for 307 headers. What should the table show according to you?
keyword 308
unsupported old browser version result.
I think this good information, so I suggested.
if ignored, its ok.
please, close thread.
thank you.
+1
I'm curious what the browser support is for the new 307 and 308 status codes. If the browser correctly redirects to the new location while preserving the method (like POST), then the browser has the feature implemented correctly. If the browser either doesn't redirect, or switches the method to GET, then it fails.
Test case:
Browser sends a POST to /test1/, Server responds 307, Location: /test2/
Browser must POST to /test2/. (if it either doesn't redirect, or uses GET on the 2nd request, it fails).
I don't really care much about the difference between 307 and 308. Like you hinted above, it's _mostly_ for search engines, though I assume the browser will cache 308 as hard as they cache a 301. I personally only need to use the 307 code currently, and I don't really care if the browser is caching 308's or not.
(I also think this issue should be renamed something like 307/308 resume/redirect keep verb)
+1
Showing the support for 307 and 308 is helpful.
It'd be nice to show support for 308. (I suspect that 307 is well-supported, since it's a part of the 1999 HTTP/1.1 spec; 308 was added in 2014 via RFC 7238.)
I found a checker at http://webdbg.com/test/308/. A few data points of browsers that support 308, according to that test:
Which means that, contrary to all the info I found on the Internet, I can use a 308 response code, at least if I'm supporting only current browsers.
The specs leave different options for clients, and caniuse could document which browsers use which of these. RFC 2616 writes
If the {301,302,307} status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
but that requirement appears to be gone from RFC 7231 or RFC 7538. These write that
The user agent MAY use the Location field value for automatic redirection.
and
Note: For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request.
for many of the requests. So we could examine features like whether the browser does redirect automatically without user intervention, or automatically after asking for confirmation, or not automatically at all. Based on all combinations of status code, request method, perhaps whether the new location is on the same or a different domain, and perhaps which of the locations use HTTPS. Not sure which of these might make a difference. And I'd also like to see which browsers actually turn POST into GET here. Quite a lot of browser-specific behavior here.
+1 Would like to know if I can safely issue 307 or 308 redirects and expect modern browsers to know what to do with them. I'm not even concerned about what the browser does. Just knowing that it will try to do something with it instead of showing the user some kind of error would be beneficial.
+1
+1 for 307/308 support.
+1
Available at https://caniuse.com/#feat=mdn-http_status_307 and https://caniuse.com/#feat=mdn-http_status_308
Most helpful comment
It'd be nice to show support for 308. (I suspect that 307 is well-supported, since it's a part of the 1999 HTTP/1.1 spec; 308 was added in 2014 via RFC 7238.)
I found a checker at http://webdbg.com/test/308/. A few data points of browsers that support 308, according to that test:
Which means that, contrary to all the info I found on the Internet, I can use a 308 response code, at least if I'm supporting only current browsers.