We’ve lined URL schemes:

A URL Scheme is like “http://…” or “ftp://…”. These look like a really low-level idea that you simply don’t have a lot management over, however really, you do!

I’d name it non-trivial, however builders can register new URL schemes in apps that customers set up. Again in 2017, Microsoft Edge did this:

microsoft-edge:// 

In the event you use that, the conduct is to open the URL in Microsoft Edge — even in case you’ve chosen a distinct default browser. So if I, as a blogger, wished to basically power you to make use of Edge for this website, I may, by beginning each single URL with this URL scheme. I gained’t, however I may. And so may Microsoft.

On the time, Daniel Aleksandersen wrote a program referred to as EdgeDefelector to avoid that conduct and defined:

I don’t hate Microsoft Edge — perhaps you do! — however I do consider customers who’ve bothered to configure a distinct default net browser needs to be allowed to maintain utilizing that default net browser. 

This has come again into the general public eye a bit because the Courageous browser now helps the microsoft-edge:// URL scheme. Apparently, not solely does an app have to register a URL scheme, however different apps that help clicks-on-links have to honor it too. Firefox can also be considering of including it. I believe the chance of not supporting the URL scheme is that clicks on hyperlinks like that would do nothing as an alternative of really opening the URL.

Plenty of the discuss is about Home windows 11. However right here on my Mac, I see this URL scheme do what it intends throughout all these browsers.

Safari
Chrome
Firefox
Courageous

Daniel goes additional:

So, how did we get right here? Till the discharge of iOS model 14 in September 2020, you couldn’t change the default net browser on iPhones and iPads. Google has many apps for iOS, together with a shell for its Chrome browser. To tie all its apps collectively, Google launched a googlechrome: URL scheme in February 2014. It may use these hyperlinks to direct you from its Search or Mail app and over to Chrome as an alternative of Apple’s Safari browser.

Right here’s my iPhone 13 opening googlechrome://css-tricks.com with and with out Google Chrome put in.

iOS Safari with Google Chrome put in
iOS Safari with out Google Chrome put in

Looks like that will be Google’s sin, however it’s apparently Apple that allowed it on iOS. Daniel as soon as extra:

The unique sin was Apple’s, however Microsoft is gulping the juice of the apple with gusto.

I’m not as boned up on all this as I needs to be, however I believe if I made software program that was concerned right here, I’d be tempted to intercept these URL schemes and have them open within the browser the consumer is already in. The online is the online, there needs to be no purpose any given URL has to open in any particular browser.

#BrowserSpecific #URL #Schemes #CSSTricks

Leave a Reply

Your email address will not be published. Required fields are marked *