Skip to catalogue

225

protocol handler

also file association, custom URL scheme

The OS opens your app for a scheme or a file type. The already-running instance must receive it.

What is protocol handler?

A protocol handler registers a URL scheme or a file extension. The OS launches the app, or forwards the URL to the running instance. The installer has to write that registration. A handler that only works from inside a running debug session is not registered.

Why does protocol handler matter when vibe coding?

Generated apps listen for the URL in the window after load. Cold start from a double-clicked file drops the path. Windows delivers it on the command line of the second process, which the app ignores.

How do you do protocol handler?

Register the scheme and the file types in the package. Handle them on cold start and on the second instance. Parse the URL. Do not treat it as a shell command.

How do you ask a model for protocol handler?

Register (scheme or extension) for (app). On cold start and on a second launch, open that target. Do not shell out to the URL. Do not drop it if the app was not already open.

What goes wrong with protocol handler?

A custom scheme with no host allowlist. Any page can launch the app and pass it arguments.

adjacent