Issue link: https://read.uberflip.com/i/1146286
More Than Just Images | 25 The number of empty versus primed cache page views depends on the nature of the web application. A site like "word of the day" might only get one page view per session from the typical user. There are several reasons why the "word of the day" components might not be in the cache the next time a user visits the site: • Despite her desire for a better vocabulary, a user may visit the page only weekly or monthly, rather than daily. • A user may have manually cleared her cache since her last visit. • A user may have visited so many other web sites that her cache filled up, and the "word of the day" components were pushed out. • The browser or an antivirus application may have cleared the cache when the browser was closed. With only one page view per session, it's not very likely that "word of the day" com- ponents are in the cache, so the percentage of primed cache page views is low. On the other hand, a travel or email web site might get multiple page views per user session and the number of primed cache page views is likely to be high. In this instance, more page views will find your components in the browser's cache. We measured this at Yahoo! and found that the number of unique users who came in at least once a day with a primed cache ranged from 40–60%, depending on the Yahoo! property. That same study revealed that the number of page views with a primed cache was 75–85%. * Note that the first statistic measures "unique users" while the second measures "page views." The percentage of page views with a primed cache is higher than the percentage of unique users with a primed cache because many Yahoo! properties receive multiple page views per session. Users show up once during the day with an empty cache, but make several subsequent page views with a primed cache. These browser cache statistics illustrate why it's important to optimize the primed cache experience. We want the 40–60% of users and 75–85% of page views with a primed cache to be optimized. The percentages for your site may vary, but if users typically visit your site at least once a month or have multiple page views per session, the statistics are probably similar. By using a far future Expires header you increase the number of components that are cached by the browser and reused on subse- quent page views without sending a single byte over the user's Internet connection. More Than Just Images Using a far future Expires header on images is fairly common, but this best practice should not be limited to images. A far future Expires header should be included on * Tenni Theurer, "Performance Research, Part 2: Browser Cache Usage – Exposed!", http://yuiblog.com/blog/ 2007/01/04/performance-research-part-2.

