How to open Safari browser from any other browser in javascript? - javascript

I'm working on the core Php(PHP + bootstrap + jquery) website and I want to open the safari browser from any browser with a special URL.
IOS users are using many kinds of web browsers but my site is working on the only safari with ios users.
So when IOS users call a special URL, the safari browser should open with this URL.
I think I may use javascript functions.
Please let me know if you have any good solutions.
Best Regards.

You can't.
JavaScript does not have that kind of access to your system.

Related

iOS Browsers except Safari Keeps asking camera permission every time I load the page

We are currently developing a qr code scanning system using laravel but when I test it on Chrome or other browser except Safari, it always ask camera permission.
I have already allow camera permission on browser setting on my iPad. Is there other way to permanently allow it or only ask once on Chrome browser like on android that remembers my choice? Or is it possible to do it programmatically like using Javascript?
thank you so much! I really need everyone's help, I couldn't find any related topics on the internet about this 😄
There is no API for the PWA's to change it from "Ask" to "Allow". There is an issue on WebKit around this: https://bugs.webkit.org/show_bug.cgi?id=215884, but what can you do is to change it manually in browser settings, as it was mentioned: https://stackoverflow.com/a/57368061/615393.

Can I open a URL in Chrome using JavaScript from Edge?

My company is using Windows Edge as our default browser (so our intranet home page is loaded in Edge). Some external links in our intranet can be open/print from Chrome without any problem, however, the issue begins if the URL is open from Edge.
Can we use JavaScript to force certain links to be open on Chrome from Edge?
I tried
var shell = new ActiveXObject("WScript.Shell");
shell.run("Chrome http://...");
I got ActiveXObject is not defined.
You can't use Javascript to do that. For security reasons, Javascript is sandboxed in your browser.
See this question for more info.
There are plugins that can do that, but this would require installing them on everyone's computer.
ActiveX is not supported in Edge. So no, that won't work. And, since JavaScript alone is not allowed to access OS resources, you won't be able to accomplish this.

Javascript: how to open a url in Safari browser where as the application is running in Chrome?

I have a web application which is build to run on mobile devices with any browser. but there are two links which I want to open in specific browser which is say Safari.
I think this might be what you need - application:openURL:options:
I've only glanced at the doc but it seems you can choose a particular app to handle a URL.

Access mobile microphone with navigator.getUserMedia (Javascript)

building an open source app, and I released the desktop version (dmeowmixer.github.io/voicetrainer) but when I load it in mobile (my phone uses android browser) and click the button to prompt for access to users microphone input it alerts that navigator.getUserMedia isn't supported. I read somewhere that it was supported in previous version of android browser but I'm not too sure. Could someone shed some light on if this will be possible to do in mobile without making a completely new application?
https://github.com/Dmeowmixer/voiceTrainer link to repo
Firstly make sure that your android browser is supporting getusermedia. You could use the link below to check it out. http://caniuse.com/#feat=stream. If it is not supported on a browser, i don't think you can do much about it.
Check The stream provided works differently in different browsers answer to make sure you are doing the right thing how to make getUserMedia() work on all browsers if it is supportd by it!

Determine which browser is being used to visit my site

Can someone tell me how I can determine (using JavaScript etc.) what browser is being used to visit my site?
I want to redirect to a different page based on these scenarios:
Wheater the user is browsing using Safari on the iPhone.
Using IE on a desktop
Using IE on a WP7 mobile device.
Thanks.
Check out the Javascript Navigator object:
http://www.w3schools.com/js/js_browser.asp
alert(navigator.userAgent);
This script may help you for more complicated detection:
http://www.quirksmode.org/js/detect.html
You should be handling these redirections server-side though. This is particularly true if you have a mobile version of your site. Most mobile browsers do support Javascript just fine, but there are quirks.
Server-side, you can send a redirect by sending the 302 status code, and the location: header. See http://en.wikipedia.org/wiki/HTTP_location
Edit: Since you say that you need to detect mobile browsers now in your comments, just use this script: http://detectmobilebrowsers.mobi/

Categories