This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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