Skip to content

Support load timings for non-chromium browsers in the Performance Bar

In chromium based browsers we show load timings of the page (docs). Non-chromium based browsers nowadays also support load timings: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry#browser_compatibility. This allows us to enable load timings for non-chromium based browsers as well.

One difference I found with firefox and chrome is that in Chrome performance.getEntriesByType('paint'); will return an array of two values, one with the name paint and one with first-contentful-paint. Our current implementation takes the second value in the array. However, in Firefox we only seem to get one value, first-contentful-paint. One solution would be to change the logic to select firstContentfulPaint by finding the PerformanceEntry where the name value is first-contentful-paint, instead of always selecting the second value in the array.

Edited by Roy Zwambag