How to detect browser’s protocol handlers?

This would be a very, very hacky way to do this… but would this work?

  • Put the link in as normal…
  • But attach an onclick handler to it, that sets a timer and adds an onblur handler for the window
  • (in theory) if the browser handles the link (application X) will load stealing the focus from the window…
  • If the onblur event fires, clear the timer…
  • Otherwise in 3-5seconds let your timeout fire… and notify the user “Hmm, looks like you don’t have the Mega Uber Cool Application installed… would you like to install it now? (Ok) (Cancel)”

Far from bulletproof… but it might help?

Leave a Comment