How to monitor resources that fail to load in a page

The solution is as follows:

Use the performance.getEntries() method to get a list of all successfully loaded resources, traverse all page resource collections (css/image/js/font, etc.) in the onload event, and use the exclusion method to filter out successful ones from all collections List of resources, that is, the resources that failed to load

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326110121&siteId=291194637