Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

force link to open firefox instead of safari in mobile

Please forgive my english.

As you may know, Webrtc is not compatible with Safari IOS on iphone. So I need to force link to open firefox instead of safari.

I found solution for chrome:

googlechromes://google.com 

If I do the same for firefox:

firefox://google.com

It open firefox but doesn't load the url. It will just display firefox with the previous url I open on my last firefox session.

So I made a search and I found these:

Force link to open in mobile safari from a web app with javascript

Force link to open in Chrome

iOS Facebook App browser - force link to open in Safari

But none of these solutions answer to my specific question.

Can someone already faced same issue?

Thanks in advance.

Kind regards

Gauthier

like image 724
Gauthier Buttez Avatar asked Sep 03 '25 14:09

Gauthier Buttez


2 Answers

Firefox URL scheme to do that would look like:

firefox://open-url?url=https://google.com

There is an open in Firefox library that can help with escaping:

https://github.com/mozilla-mobile/firefox-ios-open-in-client

Firefox also has a bug open to add support in IntentKit

https://bugzilla.mozilla.org/show_bug.cgi?id=1399801

like image 97
Alex Davis Avatar answered Sep 05 '25 14:09

Alex Davis


I have a couple of Safari bookmarks that I use for this type of thing. These are helpful when I am using Safari, but there is some formatting issue and so I want to quickly/easily open the same page in another iOS browser. HTH.

Safari Bookmark Name: Open In Firefox
Bookmark URL: javascript:location.href=%22firefox%3A%2F%2Fopen-url%3Furl%3D%22+location.href;

Safari Bookmark Name: Open In Chrome
Bookmark URL:
javascript:location.href=%22googlechrome%22+location.href.substring(4);

like image 22
Leon Shaner Avatar answered Sep 05 '25 15:09

Leon Shaner