0

My requirement is I need to check whether Chrome browser is insatlled on the client machine or not using Javascript. I have searched on the net not able to find the way out. Please help in getting this done.

Sk Manolya
  • 11
  • 6

3 Answers3

1

You can't do that with JavaScript, and even if you could, you shouldn't.

JavaScript on the client doesn't have access to the user's system, for very good reasons. (Think, servers with bad intentions.)

Josh Beam
  • 18,506
  • 2
  • 39
  • 68
0

You can check if the browser is Chrome with the next code

if(!window.chrome){
   //Chrome code
}else{
   // Chrome block
}
LGtheCat
  • 23
  • 4
0

You can't. Not with JavaScript. However, you can check whether the browser that is currently being used to view your webpage is Google Chrome or not.

<script type="text/javascript">
if(window.chrome){
document.write("Browser is Chrome");
}
else{
document.write("Please download Chrome");
}
</script>