{"id":354365,"date":"2021-10-26T13:06:29","date_gmt":"2021-10-26T20:06:29","guid":{"rendered":"https:\/\/css-tricks.com\/?p=354365"},"modified":"2021-10-26T13:06:32","modified_gmt":"2021-10-26T20:06:32","slug":"on-browser-specific-url-schemes","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/on-browser-specific-url-schemes\/","title":{"rendered":"On Browser-Specific URL Schemes"},"content":{"rendered":"\n

We’ve covered URL schemes<\/a>: <\/p>\n\n\n\n

A URL Scheme is like \u201chttp:\/\/\u2026\u201d or \u201cftp:\/\/\u2026\u201d. Those seem like a very low-level concept that you don\u2019t have much control over, but actually, you do!<\/p><\/blockquote>\n\n\n\n

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:<\/p>\n\n\n\n

microsoft-edge:\/\/ <\/code><\/pre>\n\n\n\n

If you use that, the behavior is to open the URL in Microsoft Edge \u2014 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.<\/p>\n\n\n\n

At the time, Daniel Aleksandersen wrote a program called EdgeDefelector<\/a> to circumvent that behavior and explained<\/a>:<\/p>\n\n\n\n

I don\u2019t hate Microsoft Edge\u200a\u2014\u200amaybe you do!\u200a\u2014\u200abut I do believe users who have bothered to configure a different default web browser should be allowed to keep using that default web browser. <\/p><\/blockquote>\n\n\n\n

This has come back into the public eye a bit as the Brave browser now supports the microsoft-edge:\/\/<\/code> 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<\/a>. I think the risk of not supporting<\/em> the URL scheme is that clicks on links like that could do nothing<\/em> instead of actually opening the URL.<\/p>\n\n\n\n

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.<\/p>\n\n\n\n

\"\"
Safari<\/figcaption><\/figure>\n\n\n\n
\"\"
Chrome<\/figcaption><\/figure>\n\n\n\n
\"\"
Firefox<\/figcaption><\/figure>\n\n\n\n
\"\"
Brave<\/figcaption><\/figure>\n\n\n\n

Daniel goes further:<\/p>\n\n\n\n

So, how did we get here? Until the release of iOS version 14 in September 2020, you couldn\u2019t 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:<\/code> 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\u2019s Safari browser.<\/p><\/blockquote>\n\n\n\n

Here’s my iPhone 13 opening googlechrome:\/\/css-tricks.com<\/code> with and without Google Chrome installed.<\/p>\n\n\n\n

\n
\n
\"\"
iOS Safari with Google Chrome installed<\/figcaption><\/figure><\/div>\n<\/div>\n\n\n\n
\n
\"\"
iOS Safari without Google Chrome installed<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n

Seems like that would be Google’s<\/em> sin, but it is apparently Apple that allowed it on iOS. Daniel once more:<\/p>\n\n\n\n

The original sin was Apple\u2019s, but Microsoft is gulping the juice of the apple with gusto.<\/p><\/blockquote>\n\n\n\n

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<\/em>. The web is the web, there should be no reason any given URL has<\/em> to open in any specific browser. <\/p>\n","protected":false},"excerpt":{"rendered":"

We’ve covered URL schemes: A URL Scheme is like \u201chttp:\/\/\u2026\u201d or \u201cftp:\/\/\u2026\u201d. Those seem like a very low-level concept that you don\u2019t 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: If you […]<\/p>\n","protected":false},"author":3,"featured_media":354384,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[4],"tags":[1021,1465,1470,872,1331],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/10\/edge-link.jpg?fit=1200%2C600&ssl=1","jetpack-related-posts":[{"id":279952,"url":"https:\/\/css-tricks.com\/browser-diversity-commentary-regarding-the-edge-news\/","url_meta":{"origin":354365,"position":0},"title":"Browser Diversity Commentary, Regarding the Edge News","date":"December 6, 2018","format":false,"excerpt":"Still no word from the horse's mouth about the reported EdgeHTML demise, but I hear that's coming later today. The blog posts are starting to roll in about the possible impact of this though. Update: here are the official announcements. Andre Garzia While we Blink, we loose the Web: Even\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/06\/ie-tiles.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":279839,"url":"https:\/\/css-tricks.com\/sayonara-edge\/","url_meta":{"origin":354365,"position":1},"title":"Sayonara Edge","date":"December 4, 2018","format":false,"excerpt":"Sounds like Edge is going to spin down EdgeHTML, the engine that powers edge, and go with Chromium. It's not entirely clear as I write whether the browser will still be called Edge or not. Opera did this same thing in 2013. We'll surely be seeing much more information about\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":286117,"url":"https:\/\/css-tricks.com\/edge-goes-chromium-what-does-it-mean-for-front-end-developers\/","url_meta":{"origin":354365,"position":2},"title":"Edge Goes Chromium: What Does it Mean for Front-End Developers?","date":"April 11, 2019","format":false,"excerpt":"In December 2018, Microsoft announced that Edge would adopt Chromium, the open source project that powers Google Chrome. Many within the industry reacted with sadness at the loss of browser diversity. Personally, I was jubilant. An official release date has yet to be announced, but it will be at some\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/04\/edge-chromium.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":296714,"url":"https:\/\/css-tricks.com\/a-business-case-for-dropping-internet-explorer\/","url_meta":{"origin":354365,"position":3},"title":"A Business Case for Dropping Internet Explorer","date":"October 28, 2019","format":false,"excerpt":"The distance between Internet Explorer (IE) 11 and every other major browser is an increasingly gaping chasm. Adding support for a technologically obsolete browser adds an inordinate amount of time and frustration to development. Testing becomes onerous. Bug-fixing looms large. Developers have wanted to abandon IE for years, but is\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/10\/ie-inverted.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":275463,"url":"https:\/\/css-tricks.com\/the-ecological-impact-of-browser-diversity\/","url_meta":{"origin":354365,"position":4},"title":"The Ecological Impact of Browser Diversity","date":"August 30, 2018","format":false,"excerpt":"Early in my career when I worked at agencies and later at Microsoft on Edge, I heard the same lament over and over: \"Argh, why doesn\u2019t Edge just run on Blink? Then I would have access to ALL THE APIs I want to use and would only have to test\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2018\/08\/ecology-featured.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":364346,"url":"https:\/\/css-tricks.com\/ie-down-edge-up-global-browser-usage-stats-are-for-cocktail-parties-and-conference-slides\/","url_meta":{"origin":354365,"position":5},"title":"IE Down, Edge Up… Global Browser Usage Stats Are for Cocktail Parties and Conference Slides","date":"February 28, 2022","format":false,"excerpt":"I enjoy articles like Hartley Charlton's \"Microsoft Edge Looks Set to Overtake Safari as World's Second Most Popular Desktop Browser.\" It's juicy! We know these massive players in the browser market care very much about their market share, so when one passes another it's news. Like an Olympic speed skater\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/10\/ie-inverted.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/354365"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=354365"}],"version-history":[{"count":5,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/354365\/revisions"}],"predecessor-version":[{"id":355095,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/354365\/revisions\/355095"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media\/354384"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=354365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=354365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=354365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}