Sunday, August 17, 2014

Filled Under:

Difference between Empty cache vs. primed cache

Difference between Empty cache vs. primed cache


In this topic we are going to see the Difference between Empty cache vs. primed cache.

Empty cache vs. primed cache:-


A web browser stores certain downloaded items for future use in a browser cache folder.Images, JavaScript, CSS, and even entire web pages are examples of cache items. Before you start looking at tools that allow you to profile a website, it’s important to understand the differences between an empty cache and a primed cache. The first time you visit a website, you won’t have a cache of that site. But as you continue to browse the website, the browser cleverly stores the components you download in this temporary folder cache. The next time you visit the same website, you’ll have a primed cache that contains the website’s cached items. The browser does this so that on subsequent visits to the same website, it can easily retrieve the components, which speeds up your download time.
The empty cache shown in figure represents the first time a user visits a site. Compare that to the primed cache for the same website. You can see the difference in both the number of HTTP requests and the total weight of the web pages. The total weight of the web page on the left is 130K; the total weight for the primed cache on the right is 39.8K.



All the components that were saved from the first visit were retrieved from the cache, thus cutting the download time and weight drastically. An important question to ask yourself when analyzing your website is “How many of my users are first-time visitors (who will have an empty cache) and how many are repeat visitors (who will have a primed cache)?” When you answer this question, based on statistics gathered while using a website analytics package, you’ll understand where to focus while you’re optimizing your website’s performance. If you don’t use a website analytics package or you don’t have enough data to determine visitor trends, it can be helpful to think about the domain of your website.

Is it an intranet website that might expect a lot of repeat visits throughout the day? Is it a site expecting to attract a lot of new visits? This mindset allows you to put yourself in the shoes of the user so you can improve and enhance their site experience. It’s also important to note that both the primed and empty caches of a browser need to be taken into account when profiling, implementing, and monitoring a web page. Sometimes you may find yourself refreshing a web page and getting skewed results because the browser is actually retrieving the components from its cache instead of fetching a fresh version on an empty cache. Most browsers will allow you to refresh a page by hitting the F5 key, which might load the page from cache. But Ctrl-F5 forces a cache refresh, and will guarantee that you’ll get the newest content. You may also find that some browsers allow you to force a cache refresh by holding Shift (or Ctrl) and clicking the refresh icon. Keep this in mind when you’re profiling your site because you might be profiling a web page that’s been updated on the server but isn’t reflected in your browser because of caching.




0 comments:

Post a Comment