performance.clearResourceTimings();
performance.getEntriesByType("resource").length; // 0Performance: clearResourceTimings() method / notebook
Performance: clearResourceTimings() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
function perfObserver(list, observer) {
list.getEntries().forEach((entry) => {
// do something with the entries
});
}
const observer = new PerformanceObserver(perfObserver);
observer.observe({ type: "resource", buffered: true });
// Store entries and empty performance observer
const records = observer.takeRecords();