Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1105345 of 307 Temporary Redirect

  • Revision slug: Web/HTTP/Status/307
  • Revision title: 307 Temporary Redirect
  • Revision id: 1105345
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The HTTP 307 Temporary Redirect redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the {{HTTPHeader("Location")}} headers. Browser redirects to this page, but search engines updates their link to the resource (In SEO-speak, it is said that the link-juice is not sent to the new URL).

The method and the body of the original request are reused to perform the redirected request. In the cases where you want the method used to be changed to {{HTTPMethod("GET")}}, use {{HTTPStatus("303")}} See Also instead. This is useful when you want to give an answer to a {{HTTPMethod("PUT")}} method that is not the uploaded resources, but a confirmation message (like "You successfully uploaded XYZ").

The only difference between 307 and {{HTTPStatus("302")}} is that 307 guarantees that the method and the body will not be changed when the redirected request is made.With 302, some old clients were incorrectly changing the method to {{HTTPMethod("GET")}}: the behavior with non-GET methods and 302 is then unpredictable on the Web, whereas 307 one is. For GET requests, their behavior is identical.

Status

307 Temporary Redirect

Specifications

Specification Title
{{RFC("7231", "307 Temporary Redirect" , "6.4.7")}} Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

Browser compatibility

{{Compat}}

See also

  • {{HTTPStatus("302")}} Found, the equivalent of this status code, but that never changes may change the method used when it is not a {{HTTPMethod("GET")}}.
  • {{HTTPStatus("303")}} See Also, a temporary redirect that changes the method used to {{HTTPMethod("GET")}}.
  • {{HTTPStatus("301")}} Found, the temporary redirect

Revision Source

<div>{{HTTPSidebar}}</div>

<p>The HTTP <code><strong>307</strong></code><strong><code> Temporary Redirect</code></strong> redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the {{HTTPHeader("Location")}} headers. Browser redirects to this page, but search engines updates their link to the resource (In SEO-speak, it is said that the link-juice is not sent to the new URL).</p>

<p>The method and the body of the original request are reused to perform the redirected request. In the cases where you want the method used to be changed to {{HTTPMethod("GET")}}, use {{HTTPStatus("303")}} <code>See Also</code> instead. This is useful when you want to give an answer to a {{HTTPMethod("PUT")}} method that is not the uploaded resources, but a confirmation message (like "You successfully uploaded XYZ").</p>

<p>The only difference between <code>307</code> and {{HTTPStatus("302")}} is that <code>307</code> guarantees that the method and the body will not be changed when the redirected request is made.With <code>302</code>, some old clients were incorrectly changing the method to {{HTTPMethod("GET")}}: the behavior with non-<code>GET</code> methods and <code>302</code> is then unpredictable on the Web, whereas <code>307</code> one is. For <code>GET</code> requests, their behavior is identical.</p>

<h2 id="Status">Status</h2>

<pre class="syntaxbox">
307 Temporary Redirect
</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7231", "307 Temporary Redirect" , "6.4.7")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you’d like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data/README.md">https://github.com/mdn/browser-compat-data/README.md</a> and send us a pull request.</p>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{HTTPStatus("302")}} <code>Found</code>, the equivalent of this status code, but that never changes may change the method used when it is not a {{HTTPMethod("GET")}}.</li>
 <li>{{HTTPStatus("303")}} <code>See Also</code>, a temporary redirect that changes the method used to {{HTTPMethod("GET")}}.</li>
 <li>{{HTTPStatus("301")}} <code>Found</code>, the temporary redirect</li>
</ul>
Revert to this revision