Glenn E. Fleming, MD, MPH, Contributor, MarketHive

(Reposted from Patrick Sexton, https://varvy.com)

Consequences of Redirects

In the past, redirects were oftentimes utilized for various reasons (i.e., SSL redirects).  As a result, extremely long redirect chains have occurred. 

The below example illustrates a typical conversation that occurs often on the mobile web. Please note that this conversation has to take place before any of your webpage even begins to be displayed at all:

  1. Mobile device: "Give me http://example.com"
  2. Web server: "http://example.com has been moved to "http://www.example.com"
  3. Mobile device: "Okay, give me "http://www.example.com"
  4. Web server: "http://www.example.com has been moved to "https://www.example.com"
  5. Mobile device: "Okay, give me "https://www.example.com"
  6. Web server: "https://www.example.com has a mobile version at "https://m.example.com"
  7. Mobile device: "Okay, give me "https://m.example.com"
  8. Web server: "https://m.example.com has a better version at "https://m.example.com/better/"
  9. Mobile device: "Okay, give me "https://m.example.com/better/"
  10. Web server: "Okay here is that page"
  11. Mobile device: "I will now start loading the page."

In this scenario, several seconds have passed before the mobile device even starts loading the page. In other words, even if that page loads in less than a second, it would still take several seconds for a user to see that page because of the redirects.

*Note that the above process is just for the html of your page. In some scenarios, this process will occur for every request. Each image, each css file, each JavaScript file, etc. on your page may end up with the same issues if you are not careful about how you are doing things.

David