0

I am facing a weird issue where sometimes all the files are not loaded from the server and hence resulting in broken web page. I can simply check for angular like window.angular !== 'undefined, but there are like 20-25 script tags for each library and I cannot check for each one of them

It would be nice if we can alert the user by detecting if any of the css/js files fail to load.

Sai Ram Gupta
  • 1,143
  • 2
  • 9
  • 26
  • You have the `onerror` event (https://developer.mozilla.org/es/docs/Web/API/GlobalEventHandlers/onerror) which you can bind to a ` – yuriy636 Aug 09 '16 at 18:54
  • 2
    http://stackoverflow.com/questions/8504673/how-to-detect-on-page-404-errors-using-javascript read this – AB Udhay Aug 09 '16 at 18:56

0 Answers0