flash service

High_Performance_Web_Sites

Issue link: https://read.uberflip.com/i/1146286

Contents of this Issue

Navigation

Page 149 of 169

128 | Chapter 15: Deconstructing 10 Top Sites Rule 1: Make Fewer HTTP Requests Combining scripts and stylesheets would reduce the number of HTTP requests. The page has six scripts, three of which are loaded close together at the top of the page and could easily be combined. The three stylesheets are also loaded close together at the top of the page, making it easy to combine them as well. Rule 3: Add an Expires Header The MySpace page has over a dozen images with no Expires header. Some of the images in the page understandably wouldn't benefit from an Expires header because they rotate frequently, such as in the new videos and new people sec- tions of the page. However, some of the images that are used on every page also do not have an Expires header. Rule 9: Reduce DNS Lookups The impact of DNS lookups would be reduced by eliminating some of the 10 unique domains used in the page. Rule 10: Minify JavaScript Four scripts, totaling over 20K, are not minified. As shown in Figure 15-21, there's a high degree of parallelized HTTP requests in the middle of the page, but the beginning of the page is negatively affected by the block- ing behavior of scripts and stylesheets (this blocking behavior is described in Chapter 6). Combining these files would lessen the impact. The effect is worse here because the HTTP requests were measured in Firefox. In addition to scripts block- ing parallel downloads (in both Firefox and Internet Explorer), stylesheets also block parallel downloads (only in Firefox). Nevertheless, combining scripts and doing the same for stylesheets would improve the performance for both Firefox and Internet Explorer.

Articles in this issue

Archives of this issue

view archives of flash service - High_Performance_Web_Sites