HTML5 offline article

Home >> HTML5 offline >>

  How to check browser support WebSQL or not

This Article will explain you, how to check browser support WebSql or not. Creating the offline database (Browser Database) we use the following syntax and using the same syntax we can identify whether browser support the WebSql or not.

Creating a database 

var mywebdb = openDatabase('websql_db', '1.0', 'phpcodehub WebSql Test DB', 2 * 1024 * 1024);

 Check browser does support WebSql or not

if (!window.openDatabase) {                       
    alert("Sorry! Your Browser does not support WebSql Database.")
	
}else{
	alert("Congratulation Your Browser support WebSql Database.")	
    // Create your DB and execute your business logic.
	
}

 

Write your comment now