Custom URI Scheme and browser friendly URLs

961 views
Skip to first unread message

John Weland

unread,
Apr 11, 2013, 1:38:06 PM4/11/13
to chromiu...@chromium.org
I am working on a mobile friendly website and liked the idea of having my URLs open in native apps; like say to Google Maps or Facebook using custom URI protocols eg fb:// or comgooglemaps://. Unfortunately on a desktop the browser (IE, Firefox and Chrome for example) do not know what fb:// or comgooglemaps:// means so those links do absolutely nothing. I need to add some sort of fall back like:

<a href="fb://profile?id=1234" fallbackurl="http://facebook.com"> click here </a> 

Unfortunately spending all day on Google has turned up not a single solution. Currently the only work-a-round I can come up with is to make 2 sets of links and display or hide a given link based on media queries. This sounds like a sloppy solution, hopefully someone else here has a better idea.

To reiterate I need to use the custom URI Scheme to make full use of the abilities of certain apps like opening facebook in the native app rather then the mobile browser but when viewed on the desktop it need to go to the proper browser URL.

PAEz

unread,
Apr 30, 2013, 9:00:55 AM4/30/13
to chromiu...@chromium.org
Sorry bout the late reply, but I have a bad habit of not reading these regularly.
I'm sure you've moved on by now, but here's one thing you could have done...

John Weland

unread,
Apr 30, 2013, 9:11:26 AM4/30/13
to chromiu...@chromium.org
I had just put that on the back burner. I had tried a few JS workarounds but couldn't get them to work.If I have time tonight after work I will try this out. One question as I can't remember how it works. On a mobile device without the native app installed does it default to the browser?
Reply all
Reply to author
Forward
0 new messages