How to force links sent by email to open in user's browser instead of gmail in-app browser

Stack Overflow Asked by MMJ on July 22, 2020

I have a website that is JavaScript-heavy and requires user to record their videos, When I send my emails to my customers the link opens in gmail’s in-app browser which you cannot record from, Plus there’s many functionalities missing.

How to trigger a popup when user clicks the links in the email to select whatever browser they wants instead of gmail’s in-app one? I’ve seen some people do that I tried and did some research for it but not results.

2 Answers

The option to send links in the Gmail (or any app) WebView to the system handler is reserved for the app itself.

The implementation for apps is described here:

WKWebView open links from certain domain in safari

WebView link click open default browser

However, if you instruct the recipient to long press the link in the email, there is an option to open the link in browser and that will take them to the default browser.

Answered by NewEndian on July 22, 2020

By default a web browsers cannot open a rival's web browser. This would be a security risk. There are hacks which involve the user downloading an add-on or extension. See answer in

The popup you're referring to are most likely apps. The user would have to granted permission. (This I don't have experience with).

It looks like there is no way to programmatically force emails on Android to open in Chrome browser. The user has to alter their system settings. Therefore, an alternative approach may be to educate the user (about the loss of functionality). This can be done by preforming browser sniffing & displaying an appropriate message at the top of the webpage.

With JavaScript, you can test if a function is supported & enabled by creating functions. Below is an example, which determine is LocalStorage is available. (It's only for illustration purposes).

function isLocalStorageEnabled(){
    var test = 'test';
    try {
        localStorage.setItem(test, test);
        return true;
    } catch(e) {
        return false;

if(isLocalStorageEnabled() === true){
    // available
    // unavailable

Also I believe there is no single way to detect if the user, is using Gmails built-in browser or Chrome. However based on the following factors, you can assume they're using Gmail if:

If all criteria are true, then you can then display a message like: For full functionality, please use Chrome or alternatively in Gmail: Go to Settings, General, and uncheck the option to open links in gmail (and reopen link from Gmail).

Note: browser detection can be faked. However this should be fine for displaying messages.

Answered by Greg on July 22, 2020

Add your own answers!

Related Questions

VBA Chart set a manuel Y-Axis Scale

2  Asked on December 31, 2020 by user9741285


How to group already stacked bars when using R ggplot and geom_bar

2  Asked on December 30, 2020 by christophe-antoniewski


How can I learn the python 3x interpreter?

1  Asked on December 30, 2020 by sproulel


how to get grid id as string in c#

1  Asked on December 30, 2020 by dr-engg


find entry with needed information

3  Asked on December 29, 2020 by ashley


Heroku error: bash: web:: command not found

2  Asked on December 29, 2020 by fayewaii


regex to match question sentences in long text

1  Asked on December 29, 2020 by duke-wellington


Issues with linking Javascript files with Node.js and HTML

2  Asked on December 29, 2020 by coder-husk


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir