How to get resources status

hi

using resource timing api (performance.getEntriesByType(‘resource’) )
i am getting resources list, but i am not getting resources which are failed to load .

any way i can get all resources with its status using javascript ?

The behaviour of resources that failed to load was undefined in the initial spec so different browsers behaved in different ways.

The v2 of the spec clears this up and all resources should be included regardless of whether they succeed - Resource Timing Level 2

You’ll probably need to use a a combination of absent timing points, and sizes to infer any failures (see the spec for details)