MySpace
Figure 17-20. http://www.myspace.com
It's a challenge for web sites geared toward user-generated content to achieve fast performanceâthe content is varied and changes frequently. Nevertheless, there are some simple changes that would improve the response time of MySpace (http://www.myspace.com).
- 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 anExpires
header because they rotate frequently, such as in the new videos and new people sections of the page. However, some of the images that are used on every page also do not have anExpires
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 17-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 blocking behavior ...
Get High Performance Web Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.