0

In angular 4 I have opened a website in the Chrome Browser and I want to open a link in a window in Firefox. Is this possible?

Blackbam
  • 17,496
  • 26
  • 97
  • 150
Florence
  • 1,641
  • 3
  • 13
  • 23

3 Answers3

1

There is now way to do something like this. The Browser is a sandbox which has certain restrictions.

It would be a major threat to security (and usability) if you could access the users' OS like this and start a different application. Furthermore there is luckily no way to check which applications a user has installed through your Browser.

You can determine which Browser the User is (probably) using - in JavaScript and PHP for instance and conditionally display content depending on this e.g. recommend opening the website within another Browser.

Examples:

http://php.net/manual/de/function.get-browser.php

How to detect Safari, Chrome, IE, Firefox and Opera browser?

Blackbam
  • 17,496
  • 26
  • 97
  • 150
0

Unfortunately not, you are sandboxed in your browser.

Jimbot
  • 696
  • 5
  • 20
0

What you might do is check the user's browser and give them a warning to use another browser, or even a link to the other browser's download page.

Use navigator.userAgent to check if it's Firefox (or any other).

if (!~navigator.userAgent.indexOf('Firefox')) {
     // not Firefox, show the message.
}
Victor Ivens
  • 2,221
  • 2
  • 22
  • 32