A URL Scheme is like “http://…” or “ftp://…”. Those seem like a very low-level concept that you don’t have much control over, but actually, you do!
I’d call it non-trivial, but developers can register new URL schemes in apps that users install. Back in 2017, Microsoft Edge did this:
microsoft-edge://
If you use that, the behavior is to open the URL in Microsoft Edge — even if you’ve chosen a different default browser. So if I, as a blogger, wanted to essentially force you to use Edge for this site, I could, by starting every single URL with this URL scheme. I won’t, but I could. And so could Microsoft.
At the time, Daniel Aleksandersen wrote a program called EdgeDefelector to circumvent that behavior and explained:
I don’t hate Microsoft Edge — maybe you do! — but I do believe users who have bothered to configure a different default web browser should be allowed to keep using that default web browser.
This has come back into the public eye a bit as the Brave browser now supports the microsoft-edge://
URL scheme. Apparently, not only does an app need to register a URL scheme, but other apps that support clicks-on-links need to honor it too. Firefox is also thinking of adding it. I think the risk of not supporting the URL scheme is that clicks on links like that could do nothing instead of actually opening the URL.
A lot of the talk is about Windows 11. But here on my Mac, I see this URL scheme do what it intends across all these browsers.
Daniel goes further:
So, how did we get here? Until the release of iOS version 14 in September 2020, you couldn’t change the default web browser on iPhones and iPads. Google has many apps for iOS, including a shell for its Chrome browser. To tie all its apps together, Google introduced a
googlechrome:
URL scheme in February 2014. It could use these links to direct you from its Search or Mail app and over to Chrome instead of Apple’s Safari browser.
Here’s my iPhone 13 opening googlechrome://css-tricks.com
with and without Google Chrome installed.
Seems like that would be Google’s sin, but it is apparently Apple that allowed it on iOS. Daniel once more:
The original sin was Apple’s, but Microsoft is gulping the juice of the apple with gusto.
I’m not as boned up on all this as I should be, but I think if I made software that was involved here, I’d be tempted to intercept these URL schemes and have them open in the browser the user is already in. The web is the web, there should be no reason any given URL has to open in any specific browser.
Except that this is only a single type of use of URL schemes. They are also used to create links to non-browser apps, and that is definitely better for the end-user. But browsers could certainly not respect the other browser-only schemes.
I see where this is going – The return of “This web page was designed for Your Browser Here” is just around the corner!
Or, at least, the same mindset.
The problem with the microsoft-edge: scheme in particular is that Microsoft has put it everywhere in Windows 10 and 11. Tons of links force users to use Edge instead of the system default web browser. Start menu searches open Edge, links sent from your phone open in Edge, links in many first-party apps force you into edge, and help links all throughout the OS force you into Edge.
The crazy thing is why this is left up to the individual browsers to support. It should pass this behavior off to the OS to handle. Now we have a mess of different looking and behaving implementations, and that’s just for the browsers that support it.
Personally if I was making the call on whether to allow a browser to open links in another browser I’d just ignore it and interpret the link prefix as https instead.
This just seems like a dark pattern that has sprung from the well intentioned deep-links (universal links). Non-browser apps use these as well; it’s how self-hosted Sketch libraries work for example.
I wonder if this is why on my Samsung S9 sometimes apps etc open the Samsung Internet Browser and not Google Chrome (default browser)?
Custom browser schemes mechanism is the basis for application interoperability and is not limited to browsers – it works fine for native apps. I think OSes and browsers should respect it. If it is abused by a Web application, it’s the developer’s fault, not the OS’s and not the browser’s.