Demo Company
Label it · Hand-off board
Not every link is for the browser. A URL's scheme, the part before the
colon, says who should answer. For https: the browser fetches the page itself;
for the schemes below it hands the address to another program. The browser usually asks
you first. If no program has claimed the scheme, it may show an error or do nothing.
| Scheme | Try it | Who usually answers |
|---|---|---|
mailto: | mailto:help@democompany.com | Your mail program, with a new message addressed |
tel: | tel:+1-555-0100 | A phone, or a calling app on a computer |
sms: | sms:+1-555-0100 | A messaging app |
geo: | geo:32.8801,-117.2340 | A maps app, at UC San Diego (mostly phones) |
spotify: | spotify:search:web platform | The Spotify app, if it is installed and has claimed the scheme |
vscode: | vscode://file/ | Visual Studio Code, if installed |
web+demo: | web+demo:order-7 | Demo Company itself, once you register it below. A web page can claim a scheme too. |
Make Demo Company answer web+demo: links
A page can ask the browser to send a scheme to it. The name must start with
web+, and the handler must be on the page's own origin, over HTTPS:
navigator.registerProtocolHandler('web+demo', 'https://www.democompany.com/open?item=%s')
Then click web+demo:order-7: the browser opens
/open?item=web%2Bdemo%3Aorder-7 here. Chrome and Firefox support this; Safari does not.