2

Since when does chrome support window.performance.clearResourceTimings and what is the alternative if it is not available? I can't find any details in the release notes or MDN. There is a clearMarks function but it does not reset the list of items.

Elmar Weber
  • 2,683
  • 28
  • 28

2 Answers2

2

According to this bug report, performance.clearResourceTimings and performance.setResourceTimingBufferSize are prefixed in Chrome since v.30.0.1549.0

You should then call performance.webkitClearResourceTimings until this bug is fixed.

Kaiido
  • 123,334
  • 13
  • 219
  • 285
1

As it would appear, since version 29. Which was a long, long ways ago. You can view support information for things like these over on Can I use.

And as far as MDN suggests, it's just performance.clearResourceTimings(), not window.performance.clearResourceTimings()

Rando Hinn
  • 1,255
  • 19
  • 41
  • Thanks, weird though because we are getting error messages from chrome 44.0.2403.130 that the window.performance.clearResourceTimings() method does not exist (is not a function) – Elmar Weber Jul 05 '16 at 09:16
  • @ElmarWeber AFAIK and as far as [MDN suggests](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearResourceTimings), it's just `performance.clearResourceTimings()`, not `window.performance.clearResourceTimings()` – Rando Hinn Jul 05 '16 at 09:21
  • Its window.performance, that's were the API is (although performance may also work). I just downloaded and tested with Chrome 44. It has the API but not the clearResourceTimings method. – Elmar Weber Jul 05 '16 at 10:52
  • I adjusted the question to be more specific. – Elmar Weber Jul 05 '16 at 10:58