Click here to Skip to main content
15,886,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir/Ma'am


I want that my web application run only on chrome browser.

Is this possible to lock other browsers to run my application except chrome browser.
Posted
Comments
Shubham Choudhary 12-Mar-13 1:45am    
hi!!! ya its possible to lock or do not run your application on other browser
ankur789 12-Mar-13 1:55am    
how can i do it sir
Shubham Choudhary 12-Mar-13 2:38am    
you do!!! on website page load event check the which browser is used by client and make function for open or not open website page on browser !!! or show message about your website where to open
ankur789 12-Mar-13 2:41am    
have u code of it

Check if current browser is chrome then allow to open the page else show an alert and close the window.
For detecting the browser you can either use Javascript or JQuery:
Javascript Browser Detection[^]
http://forums.asp.net/t/1669781.aspx/1[^]
js_ex_browser.asp[^]
 
Share this answer
 
Use this one :

JavaScript
var isChrome = window.chrome;
if(isChrome) {
   // is chrome 
} else { 
   // not chrome 
}

Refer here :
stackoverflow
 
Share this answer
 
v2
Comments
ankur789 12-Mar-13 4:11am    
not working sir
Amir Jalilifard 12-Mar-13 4:12am    
Refer to this link :
http://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900