Javascript/HTML5 solution to monitor your internet connection