WebPagetest Forums
How to get resources status - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: How to get resources status (/showthread.php?tid=14706)

How to get resources status - rasam25 - 01-19-2017 09:12 PM


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 ?

RE: How to get resources status - andydavies - 01-20-2017 11:28 PM

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 - https://www.w3.org/TR/resource-timing-2/#resources-included

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