fixed network detection. doing it with error/success callbacks in an img html tag that is dynamically inserted into the dom with 0 width 0 height every 8 seconds