Hello I was wandering if there is a way for me to make someone open up a website in a different browser from my website for example if a person has chrome browser and visits my website is there a way in JavaScript or php I can make that person open up my website in internet explorer instead.
Asked
Active
Viewed 68 times
3
-
2All you can do is detect it's chrome and display a message saying "You must view this website in Internet Explorer." You can't launch IE for them. Also I should mention this is going to cost you users. When someone tells me "You can't view this website because you're using the wrong browser" I say "Time to find a new website." In today's world a web developer should be supporting at least IE11/Edge, Chrome latest, FireFox latest, and Safari latest. If you're not, I don't have time to deal with your site. – dmeglio Aug 10 '15 at 13:33
-
1No, but you should focus efforts on to making it compatible in Chrome instead. Good code works cross-platform. – BReal14 Aug 10 '15 at 13:34
-
It's probably worth noting that only people using Windows are going to have Internet Explorer. – Bmd Aug 10 '15 at 14:22
2 Answers
1
No, you can't.
You can't start or adapt any program on the computer of your user. That is called 'security'...
You can detect though which browser is used, and change your code accordingly. You can also show an warning that just the browsers you like are supported. See How can you detect the version of a browser?.

Community
- 1
- 1

Patrick Hofman
- 153,850
- 22
- 249
- 325
1
Sorry, but you can only detect what browser they are using and alert them:
var browserNotAllowed = "Chrome",
version = window.navigator.userAgent;
for(var i = 0; i < version.length - browserNotAllowed.length + 1; i++){
if(version.substr(i, browserNotAllowed.length) === browserNotAllowed){
alert("Sorry, this page only allows Internet Explorer, the browser you are using, " + version.substr(i, browserNotAllowed.length) + " is not allowed.");
}
}
What you see above is a example of how you can detect whether a browser is Chrome or others...

Joseph Goh
- 376
- 2
- 13