Which Http redirects the status code to use?

  • friendfeed.com uses 302.
  • bit.ly uses 301.

I decided to use 303.

Do they behave differently in terms of browser support?

+3
source share
5 answers

It depends on your purpose.

301 says: "This is not a valid URL, look elsewhere and use, remember that a different URL is better, don’t come back here!"

302 says, "This is the correct URL that you must continue to use, but to get content elsewhere."

303 as 302, but specifically for redirecting after submitting the form.

- URL, 303 . - , 302. URL , 301 , URL "". 302 SEO, : , , , .

+4

. HTTP : http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

301 - (

302 -

303 - , GET, POST

, , Atom, - URL (, Amazon S3 - ). 301, , . 302, , , URI , . ( 303 ).

+2

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html .

10.3.2 301

URI, URI. Request-URI , , . , .

10.3.3 302

URI. , Request-URI . , Cache-Control Expires.

+2

HTTP 1.1.. , , . , .

+1

301 , , , SEO.

0

Source: https://habr.com/ru/post/1722678/


All Articles