18. Minimize redirects

Minimizing HTTP redirects from one URL to another cuts out additional RTTs and wait time for users.

Sometimes it's necessary for your application to redirect the browser from one URL to another. There are several reasons web applications issue redirects:

Guidelines:

Whatever the reason, redirects trigger an additional HTTP request-response cycle and add round-trip-time latency. It's important to minimize the number of redirects issued by your application — especially for resources needed for starting up your homepage. The best way to do this is to restrict your use of redirects to only those cases where it's absolutely technically necessary, and to find other solutions where it's not.