检测自定义协议的Chrome浏览器和Safari浏览器的方法 [英] Approaches of detection of custom protocol in chrome and Safari browsers

查看:1756
本文介绍了检测自定义协议的Chrome浏览器和Safari浏览器的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能是什么检测的自定义协议(类似foo://)的最佳方式在Safari和Chrome浏览器。我一直在寻找下列选项:

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. 浏览器扩展,它可以检查的自定义协议调用软件的存在。 (不知道这是可能的,如何做到这一点)

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

浏览器插件或Java小程序(因为NPAPI现在要取消pcated所以也许这不会是好主意$ P $)。

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

Java脚本Flash动作脚本(因为Flash是沙盒装随后又好像不是好主意,用它)

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

任何一个可以提出任何其他的办法或建议?我可以去的方法#1。

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

推荐答案

您应该能够只依靠的Javascript来检测自定义协议。

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

我已经找到了为协议检测使用Javascript以下的项目,希望它有助于: https://gist.github.com/rajeshsegu/3716941

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?

这篇关于检测自定义协议的Chrome浏览器和Safari浏览器的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆