开发者

What is the difference between a primed cache and empty cache?

开发者 https://www.devze.com 2023-04-10 08:51 出处:网络
What is the difference between a primed cache and empty cache? For开发者_如何学JAVA example the statistics result of YSlow provides a graphical data of an empty cached vs. primed cache. What are the

What is the difference between a primed cache and empty cache?

For开发者_如何学JAVA example the statistics result of YSlow provides a graphical data of an empty cached vs. primed cache. What are the difference between them?


Simply, a primed cache means the browser has it cached. It has been there before, or (though I don't think YSlow means it this way) it has been somewhere that uses some of the same resources (images, CSS, JavaScript)


This was asked 3 years before, but I bumped into this question my self since I had it to. So I did a small research on the internet and I found that :

Statistics is the third tab and provides a graphical representation of the number of HTTP requests made to the server and the total weight of the page in kilobytes for both Empty Cache and Primed Cache scenarios.

What is the difference between a primed cache and empty cache?

The Empty Cache scenario is when the browser makes the first request to the page and the Primed Cache scenario is when the browser has a cached version of the page. In a Primed Cache scenario, the components are already in the cache, so this will reduce the number of HTTP requests and thereby the weight of the page.

Keyword here is "scenarios". This does not mean that the graphs will change if you already have cached the page. I run the test two times even though I cached it and it always displays both graphs since it shows the "scenarios". So if I cached the page I am looking at the Primed Cache scenario but for my new visitors the Empty Cache.

So in the above example, when I request the page and it is cached, my browser will still make 3 requests with total weight of 86.6K

This page explains what actually yslow displays. http://www.devcurry.com/2010/07/understanding-yslow-firebug-extension.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号