﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29925	Redirect with HTTP/2 Server Push	Jaap Roes	nobody	"I was looking into upgrading nginx and reading it's changelog when I noticed [https://www.nginx.com/blog/nginx-1-13-9-http2-server-push/ HTTP/2 Server Push support was introduced semi-recently].

This reminded me of [https://twitter.com/simonw/status/1047865898717966337 this Tweet by Simon Willison] about accelerating redirects using a HTTP/2 Server Push header. I did some further research and stumbled upon [https://www.ctrl.blog/entry/http2-push-redirects  this article] about the same concept.

This got me thinking about using this technique in Django. 

There are a few places in Django's code base that will perform redirects to ""better"" urls, e.g. when using `CommonMiddleware` and `APPEND_SLASH is True` and/or `PREPEND_WWW is True` or using `LocaleMiddleware` i.c.w. `i18n_patterns`. Wouldn't it be nice if these redirects also included a `Link: <redirect-location>; rel=preload` header?

Would adding something like this be acceptable to the Django codebase? I'm unsure if it's safe to include this header on non-http/2 connections/servers, but I'd assume it will be.

A step further would be to always do this for all `HttpResponseRedirectBase` classes, or alternatively, introduce a `Http2ServerPushRedirectBase` class.
"	New feature	closed	HTTP handling	dev	Normal	wontfix	http2 server push redirects		Accepted	0	0	0	0	0	0
