Detect Internet connection in HTML5

By Dhananjay Kumar Blogs | HTML 5 Jun 20, 2012
In this blog I am going to explain about how to detect whether browser is connected to Internet or not.

In this quick post we will detect whether browser is connected to Internet or not? There are two ways you can detect it

  1. By making a AJAX call and setting the TimeOut property
  2. Using HTML5

In HTML5 you can detect it as following

1.png

This is supported in all modern browsers. In this way you can detect whether browser is connected to Internet or not. 

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs