Filip Skakun
Filip Skakun

Reputation: 31724

URI schemes supported in Windows 8 apps

What are the URI schemes supported in Windows 8 apps? I have seen references to ms-appx: and ms-appdata: and some rare mentions of ms-resource: but I could not find any document that would be a list of the schemes (although I thought I have seen one in the past). I am wondering if URL.createObjectURL returns some other schemes, but I can't see a version of it for XAML apps. http://msdn.microsoft.com/en-us/library/windows/apps/Hh781215.aspx. Are there any other URI schemes supported in WinRT?

Upvotes: 4

Views: 7422

Answers (2)

N_A
N_A

Reputation: 19897

I believe the Metro js schemes. apply to xaml as well.

Some of those for xaml apps are listed here: How to Load File Resources (for XAML apps)

ms-resource: for xaml apps is listed here: ResourceLoader.GetStringForReference

URIs available in metro applications:

General form

<scheme>://<domain name>/<path>

Http

http://www.contoso.com/images/logo.png

App Package

ms-appx:
ms-appx:///default.html
ms-appx-web:

Content referenced via this scheme is loaded from the local package, but runs with the abilities and restrictions of the web context.

File System

Can't be used directly. To use, obtain an IStorageItem and then use URL.createObjectURL

file://

App Data

ms-appdata://

Resources

ms-resource://

Dependent Packages

<domain name>:

URIs for WebSockets

ws: for unencrypted and wss: for encrypted. Used like this:

webSocket = new MessageWebSocket();
await webSocket.ConnectAsync("wss://www.example.com");

Upvotes: 12

Filip Skakun
Filip Skakun

Reputation: 31724

There now seems to be an article on Windows Dev Center that is focused specifically on URI schemes.

Upvotes: 6

Related Questions