eBay

Figure 17-10. http://www.ebay.com
The YSlow grade for eBay (http://www.ebay.com) is very close to a B. With a little bit of work it would perform well. The main problems are with Rules 1, 3, 9, and 13.
- Rule 1: Make Fewer HTTP Requests
The eBay page has 10 scripts and 3 stylesheets. A simple fix would be to use the combination technique described in Chapter 3. Four of the scripts are loaded close together at the top of the page, and three are at the bottom of the page. These should be combined into a top script and a footer script, reducing 10 scripts to 5. The three stylesheets are all loaded close together and should also be combined.
- Rule 3: Add an Expires Header
One script and one stylesheet have an
Expiresheader that is only nine hours in the future. According to theLast-Modifieddate, the stylesheet hasn't been modified in 3 days, and the script in 24 days. These are likely assets that change over time, but given the number of users of the site, it would be better to use a far futureExpiresheader to make these files cacheable. Additionally, there are five IFrames without anExpiresheader. These are used to insert ad images, some of which don't have anExpiresheader as well.- Rule 9: Reduce DNS Lookups
Nine different domains are used in the eBay page. Typically, a domain count this high includes several domains from third-party advertisers, but in this case, there are seven ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access