Blog

Detect Internet connection in HTML5

Posted 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
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.