Redirect using HTTP status "303 See Other"

92 views
Skip to first unread message

Duane Hutchins

unread,
Jun 4, 2018, 4:57:18 PM6/4/18
to Django developers (Contributions to Django itself)
The "302 Found" redirect is used by default in ​django.http.response HttpResponseRedirect.

Could we discuss changing this to use "303 See Other" redirects?

303 redirects are more in-line with the intent of the redirect after a change, and also 303 redirects disallow browser caching.
If a browser serves a cached response without revalidation, then the server would not receive the request.

303 redirects are not supported by HTTP/1.0, but all modern browsers now support HTTP/1.1 or higher.

What does everyone think about changing 302 redirects to 303?

Collin Anderson

unread,
Jun 4, 2018, 5:02:08 PM6/4/18
to django-d...@googlegroups.com
I don't think we should make any changes to HttpResponseRedirect, for backwards compatibility reasons if nothing else.

It might make sense to encourage people to use HttpResonse(status=303) directly, rather than using subclasses.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/829cedfb-855b-496a-9bf9-f60c6772f212%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages