简体   繁体   English

外部协议请求如何工作以及如何用于启动某些客户端应用程序?

[英]How does external protocol request works and how it can be used to start some client application?

Whenever anyone uses torrent magnetic link of torrent there is a pop up that comes up with external protocol request title. 每当有人使用torrent的磁力链接时,都会弹出带有外部协议请求标题的弹出窗口。 I want to know how this protocol works and how this can open an application on client from a web page. 我想知道此协议的工作原理,以及如何从网页打开客户端上的应用程序。

The dialog you're referring to is completely handled by the browser that you're using and the protocol of the link that you're clicking. 您所指的对话框完全由您使用的浏览器和您单击的链接的协议处理。

Normally, links between web pages uses the following scheme: 通常,网页之间的链接使用以下方案:

http://www.website.com/something

If you change the protocol (in this example the "http" part) you will then refer to another application, if installed in the client machine. 如果更改协议(在本示例中为“ http”部分),则将引用另一个应用程序(如果已安装在客户端计算机中)。 For example, if you click on a link that point to 例如,如果您单击指向以下内容的链接

ftp://www.website.com/something

your browser will search for an application that can handle the "ftp" protocol. 您的浏览器将搜索可以处理“ ftp”协议的应用程序。

In general, when a browser detects a link that is not something that it knows, it tries to redirect the request to another application that has been previously installed by the user and that has stated some sort of compatibility with that protocol. 通常,当浏览器检测到不是它知道的链接时,它将尝试将请求重定向到用户先前已安装的另一应用程序,该应用程序声明了与该协议的某种兼容性。

The popup is not something related to the magnet link. 弹出窗口与磁铁链接无关。 If you'd like to get further information on the protocol, this Wikipedia page explains it clearly. 如果您想获得有关该协议的更多信息,请在此Wikipedia页面上清楚地说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM