加载页面/缓存分析
Load page / Cache analysis
大家好,请帮忙分析一下我的页面。
问题一
为什么因为一切都是从缓存中加载的。加载时间为 690 毫秒?
问题2
使用的原因是什么 --> private, max-age=60000
(public), max-age=60000 VS.私人,最大年龄=60000
首先,加载时间不仅仅由从网络获取资产所需的时间来定义。绘画和解析可能会花费很多时间,Javascript 的解析也是如此。在您的情况下,DOMContentLoaded
仅在 491 毫秒后触发,因此这已经是答案的一部分。
关于你的第二个问题,答案确实在你提供的 link 中:
If the response is marked as “public” then it can be cached, even if it has HTTP authentication associated with it, and even when the response status code isn’t normally cacheable. Most of the time, “public” isn’t necessary, because explicit caching information (like “max-age”) indicates that the response is cacheable anyway.
By contrast, “private” responses can be cached by the browser but are typically intended for a single user and hence are not allowed to be cached by any intermediate cache - e.g. an HTML page with private user information can be cached by that user’s browser, but not by a CDN.
大家好,请帮忙分析一下我的页面。
问题一 为什么因为一切都是从缓存中加载的。加载时间为 690 毫秒?
问题2 使用的原因是什么 --> private, max-age=60000
(public), max-age=60000 VS.私人,最大年龄=60000
首先,加载时间不仅仅由从网络获取资产所需的时间来定义。绘画和解析可能会花费很多时间,Javascript 的解析也是如此。在您的情况下,DOMContentLoaded
仅在 491 毫秒后触发,因此这已经是答案的一部分。
关于你的第二个问题,答案确实在你提供的 link 中:
If the response is marked as “public” then it can be cached, even if it has HTTP authentication associated with it, and even when the response status code isn’t normally cacheable. Most of the time, “public” isn’t necessary, because explicit caching information (like “max-age”) indicates that the response is cacheable anyway.
By contrast, “private” responses can be cached by the browser but are typically intended for a single user and hence are not allowed to be cached by any intermediate cache - e.g. an HTML page with private user information can be cached by that user’s browser, but not by a CDN.