0

I have set my Cocoa app to be an URL handler for com_example_myapp: protocol (using this great tutorial). So, the link in Safari <a href="com_example_myapp://link"> now opens my app. Cool.

But before I give the user the link in the web browser, how can I determine whether the client's OS is capable to handle it? How to check this via JS (PHP, ...)?

I have found a lot of solutions (mostly for Mobile Safari) but cannot find anything cross-browser compatible.

Community
  • 1
  • 1
Dmitry Isaev
  • 3,888
  • 2
  • 37
  • 49

1 Answers1

0

From what I know, Chrome doesn't support this. You can try using a try/catch but it won't return anything. You can use your other references and put a specific call in their for Safari.

Lastly, I haven't tested it, but you can bind something to the window to see if it blurs.

$(window).blur(function() {
    //code to see if it blurred on a setTimeout
}

Then record the date of creating it and see if it's within 1 second so when they come back you can destroy the timer if it's still there.

Just ideas though...

romo
  • 1,990
  • 11
  • 10