URI schemes supported in Windows 8 apps
Asked Answered
B

2

4

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?

Bink answered 18/8, 2012 at 15:59 Comment(0)
F
12

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");
Feticide answered 18/8, 2012 at 16:17 Comment(0)
B
6

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

Bink answered 17/12, 2012 at 16:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.