Issue link: https://read.uberflip.com/i/1146286
46 | Chapter 6: Rule 6: Put Scripts at the Bottom Parallel Downloads The biggest impact on response time is the number of components in the page. Each component generates an HTTP request when the cache is empty, and sometimes even when the cache is primed. Knowing that the browser performs HTTP requests in parallel, you may ask why the number of HTTP requests affects response time. Can't the browser download them all at once? The explanation goes back to the HTTP/1.1 specification, which suggests that browsers download two components in parallel per hostname (http://www.w3.org/ Protocols/rfc2616/rfc2616-sec8.html#sec8.1.4). Many web pages download all their components from a single hostname. Viewing these HTTP requests reveals a stair- step pattern, as shown in Figure 6-1. If a web page evenly distributed its components across two hostnames, the overall response time would be about twice as fast. The HTTP requests would behave in the pattern shown in Figure 6-2, with four components downloaded in parallel (two per hostname). To give a visual cue as to how much faster this page loads, the horizon- tal width of the box is the same as in Figure 6-1. Limiting parallel downloads to two per hostname is a guideline. By default, both Internet Explorer and Firefox follow the guideline, but users can override this default behavior. Internet Explorer stores the value in the Registry Editor. * You can modify this default setting in Firefox by using the network.http.max- persistent-connections-per-server setting in the about:config page. It's interesting to note that for HTTP/1.0, Firefox's default is to download eight components in Figure 6-1. Downloading two components in parallel * For more information about overriding this default, see Microsoft's web article "How to configure Internet Explorer to have more than two download sessions," http://support.microsoft.com/?kbid=282402. html component component component component component component component component component component

