2

What could be the best way the detecting the custom protocol (like foo://) in Safari and chrome browser. I was looking at the following options:

  1. Browser extension which can check the existence of custom protocol invoker software. (Not sure if it is possible and how to do it)

  2. Browser plugin or java applets( since NPAPI is now going to deprecated so probably this will not be good idea).

  3. Flash Action script with java script(since Flash is sand boxed then again it seems not good idea to use it)

Can any one suggest any other approach or suggestion? can I go by approach #1.

user1461826
  • 207
  • 3
  • 10
  • http://stackoverflow.com/questions/2872090/how-to-check-if-a-custom-protocol-supported – epascarello Dec 15 '14 at 17:31
  • https://gist.github.com/rajeshsegu/3716941 – epascarello Dec 15 '14 at 17:31
  • 2
    none of approach mentioned in above links will applicable on win 8 chrome and latest safari. On invoking custom protocol , in absence of program these browser pop up to their app store. I don't want app store redirection browser own message. Instead I want to show my custom message. – user1461826 Dec 15 '14 at 17:48

1 Answers1

1

You should be able to detect the custom protocol by relying only on Javascript.

I've found the following project for protocol detection using Javascript, hope it helps: https://gist.github.com/rajeshsegu/3716941

You can check more information in this related question: How to detect browser's protocol handlers?

Community
  • 1
  • 1
Rivero
  • 911
  • 1
  • 6
  • 10