Check Browser Compatibility For Service Worker in JS

<!DOCTYPE html>
<html>
<head>
	<title>Service workers</title>
</head>
<body>

<center>
<h1>Service workers</h1>
<img src="jaischool.png">
</center>

<script>

window.onload = function()
{
	if(navigator.serviceWorker)
	{
		alert("Your Browser supports service Worker");
	}
	else{
		document.write("Please update your Browser");
	}
}

</script>
</body>
</html>

Leave a Comment