Using a far future Expires header affects page views only after a user has already visited your site. It has no effect on the number of HTTP requests when a user visits your site for the first time and the browser's cache is empty. Therefore, the impact of this performance improvement depends on how often users hit your pages with a primed cache. It is likely that a majority of your traffic comes from users with a primed cache. Making your components cacheable improves the response time for these users.
When I say "empty cache" or "primed cache", I mean the state of the browsers cache relative to your page. The cache is "empty" if none of your page's components are in the cache. The browser's cache might contain components from other web sites, but that doesn't help your page. Conversely, the cache is "primed" if all of your page's cacheable components are in the cache.
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:
a. Despite her desire for a better vocabulary, a user may visit the page only weekly or monthly, rather than daily.
b. A user may have manually cleared her cache since her last visit.
c. A user may have visited so many other web sites that her cache is filled up, and the "word of the day" components were pushed out.
d. The browser or an antivirus application may have cleared the cache when the browser was closed
With only one page view per session, it is not very likely that "word of the day" components are in the cache, so the percentage of primed cache page views is low.
Click here to read more about improving Web Site performance.
More>>
More>>
No comments:
Post a Comment