clearResourceTimings
Summary
Clears the buffer used to store the current list of PerformanceResourceTiming resources.
Method of apis/resource_timing/Performanceapis/resource_timing/Performance
Syntax
.clearResourceTimings();
Return Value
No return value
Examples
This example uses clearResourceTimings and setResourceTimingBufferSize to set an initial buffer size. It then uses onresourcetimingbufferfull to detect when the buffer is full, and executes a function that uses clearResourceTimings to clear the buffer.
performance.clearResourceTimings();
setResourceTimingBufferSize(100);
function buffFull() {
performance.clearResourceTimings();
};
performance.onresourcetimingbufferfull = buffFull;
Related specifications
- W3C Resource Timing Specification
- W3C Working Draft
Attributions
Microsoft Developer Network: Windows Internet Explorer API reference Article