const observer = new PerformanceObserver((list) => {
const cachedResources = list
.getEntries()
.filter((entry) => entry.deliveryType === "cache");
console.log(cachedResources);
});
observer.observe({ type: "resource", buffered: true });PerformanceResourceTiming: deliveryType property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const scripts = performance
.getEntriesByType("resource")
.filter((entry) => entry.deliveryType === "cache");
console.log(scripts);