6

I was really curious about how custom link prefixes work (I really have no clue what they are called), and I couldn't find anything online about it. None.

If anybody knows how this works, and/or could point me in the direction of a tutorial, that would me amazing.

EDIT: I did find a tutorial on doing this in iOS, but I need this for a PC/Windows app.

1
  • The prefix is what protocol to use. For example steam:// will be run through Steam.
    – Emz
    Dec 5, 2014 at 23:20

1 Answer 1

5

These prefixes are called URI Schemes and are introduced to allow referencing things across applications. Thus, these prefixes are the first part of a Uniform Resource Identifier.

Big companies as Valve in the case of steam seem to use URI Schemes quite excessively, without really following RFC 4395. If you plan to use such a scheme, I highly encourage you to read it, at least Section 2.8. This will make sure that your scheme does not collide with other well-behaved applications. If in doubt, ask on their mailing list.

For the technical implementation, how to implement support for a URI Scheme is heavily application-dependent. Steam, for instance, uses its schema through OS-level handlers for things like starting games or controlling the steam client through the browser. Its URIs thus somehow reference the locally installed steam client. http, as a different example, is used to reference content on a specific host. While steam is used using OS-level features and a local client, http is usually completely handled by the browser. A third example are tel URIs, which reference telephone numbers and are not directly mapped to a specific application, but also usually not handled by the browser. Thus, you should look into the documentation of the client application that should understand your URIs, and search for the APIs required to implement your functionality.


If you are interested in handling your URI scheme within a local application on Windows, there's a question covering that already.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.