How does this happen? How does it affect performance? How can it be avoided? Let's take a look.
Two main factors increase the odds of a script being duplicated in a single web page: team size and number of scripts.
As shown in Table 14-1, the average number of scripts in the 10 top U.S. sites is greater than six (this information is also given in Table 3-1 from Chapter 3). The two sites that have duplicate scripts also happen to have an above-average number of scripts (CNN has 11; ...