speeding up redirect

Hello,
if I got it right, a redirect can contain a message body. Would it make sense to include some tags in the response body, if I know that the script will be loaded by the redirect target page?

If a browser would parse the body and maybe even read the message body and fetch the java script file (assumed cacheable by the browser), the browser may have the script already, before it can parse the redirect target and find there, that a.js have to be read from the server.

Are there any good, best practices to speed up redirects (beside getting rid of redirects)?

kind regards,

Torsten

I’m fairly certain that browsers will not execute anything that you send in the body of a 301/302 response. They will see the location directive and start fetching the new page right away.

The only things I’m aware of for speeding up redirects: