W
W
wasya_uk2021-12-18 19:26:51
JavaScript
wasya_uk, 2021-12-18 19:26:51

How to open a link in another browser?

Is it possible to open the link in another browser. For example, I will press it in the opera, and chrome will open.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nurdaulet Maksutov, 2021-12-18
@maksutovn

You can't do this with regular JavaScript; If they could, it would be a security nightmare.
However, there are several ways to make something like this work. For example, a Firefox add-on can run external programs, so you could write such an add-on to open your app in IE and ask your users to install it (or ask an administrator to pre-install it for them if it's for an internal app in an environment, for example). managed workplace).
Another possibility would be to use a custom url scheme (like myapp:) to refer to your app and register that url scheme to open in IE (or rather some wrapper script that takes the custom url- address, converts it to a normal HTTP URL and opens it in IE). Again, this requires setup (and possibly script installation) on the end user's machine, so it's probably only suitable for office or similar environments.
Note that both of these decisions have security implications that you should be aware of. In particular, any add-ons or scripts you use for them should only work for specific URLs that point to your application, and should refuse to open any other URLs that someone might try to feed them.
In any case, if you're trying to do this on a public website, keep in mind that there's no way you can make this work for Linux/Mac users who don't have IE to start with. And even many Windows users might not want to use IE (let alone install an untrusted extension!) for no very good reason; after all, there seems to be a reason why they chose to use Firefox (or Chrome or Opera or whatever).

N
Nadim Zakirov, 2021-12-18
@zkrvndm

There is such an opportunity if you register the desired protocol on your computer. Of course, this will only work for you.
https://yandex.ru/search/?text=windows+%D0%B7%D0%B...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question