URI schemes supported in Windows 8 apps

Filip Skakun picture Filip Skakun · Aug 18, 2012 · Viewed 7.4k times · Source

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?

Answer

N_A picture N_A · Aug 18, 2012

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");