如何通过Web浏览器检测协议是否受支持? [英] How to detect whether a protocol is supported through web browser?

查看:280
本文介绍了如何通过Web浏览器检测协议是否受支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与iTunesLink Maker类似( http://www.apple.com / iTunes的/ linkmaker /常见问题/ )。通过网络浏览器,iTunes网页能够查明客户端工作站上是否已注册 itms:// ,从而显示正确的消息('在iTunes中查看'按钮或'下载iTunes的推广横幅。

Similar to iTunes' 'Link Maker' (http://www.apple.com/itunes/linkmaker/faq/). Through web browser, iTunes webpages is capable of finding out if itms:// has been registered on client workstation, hence displaying correct message ('View in iTunes' button or 'Download iTunes' promotion banner).

这是如何进行的?

推荐答案

不幸的是,实际上没有简单的方法可以做到这一点。 iTunes实际上使用以下脚本进行检测。从代码中可以看出,他们在每个Web浏览器中使用浏览器插件来完成此任务。

Unfortunately, there is really no easy way to do this. iTunes actually uses the following script to do the detection. From the code you can see they use a browser plug-in within each web browser to accomplish this.

在Internet Explorer中,通过 protocolLong 属性,可以使用,但显然它是浏览器特定的。

In Internet Explorer, there is a feature via the protocolLong property, which can be used, but obviously it's browser specific.

可能还有其他黑客可用,但我认为某种浏览器插件是最可靠的解决方案。

There may be other hacks available, but I think some sort on browser plug-in would be the surest solution.

这篇关于如何通过Web浏览器检测协议是否受支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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