Progressive Web Apps (PWA) and Windows 10

Hi everyone!
I recently gave a talk at the Edge Summit around what I spend a lot of my hours working on - Microsoft’s PWA plans and how it integrates nicely with the larger goal of re-using web code for both web and native solutions. In this post, I just want to share some quick notes that you can all refer to for updates.

If You Missed the Recording

First, you can watch a recording here. If you want to glance through the slides, click here.

While I think the entire talk is useful for you to watch (especially when Chandra from Microsoft Teams explains how they solve the web/native developer productivity problem), one of the big updates I provided in this talk is our timeframe for PWAs in Windows 10. This is the high-level answer:

The following sections will go into a little bit more detail:

Edge Browser Behavior

Our upcoming release next month (Fall Creator’s Update) will have Service Worker support hidden behind flags in Edge:

Apps Behavior

For apps, you can test Service Worker functionality by adding the ServiceWorker=“true” value to your appxmanifest.xml file that is a part of your project:

<uap:Rule Type="include" Match="https://contoso.com/" ServiceWorker="true" WindowsRuntimeAccess="all"/>

This will allow you to test locally on your machine, but do not submit this app to the Store. Until Service Worker functionality is fully supported, we will not allow app store submissions!

PWAs in the Store…Automatically

One of the big initiatives we are taking is getting your PWAs into the Windows Store with very little involvement from you. The way we are doing that is by using Bing to crawl your manifest.json and relying on the metadata there to create the app that lives in the Store:

We are piloting the entire workflow with a handful of apps (and their developers) right now, and we will start ramping this up as we get closer to full PWA support next year. The goal is to get quality apps into the Store. Coming up with the right algorithms to detect quality is something we are constantly tweaking, but we will detail our quality criteria shortly. You can see where we are leaning towards by referring to Aaron Gustafson’s PWA talk at Build earlier this year.

Looking Beyond October

Based on overall quality, we will start enabling Service Workers by default in Edge in our Insider Builds. The goal is to ship Service Worker support fully with our next major release next year. While I don’t have exact dates, it should be sometime around the first half of 2018 based on how we’ve shipped in the past.

Once our support for Service Worker is fully turned on, we will start allowing PWAs to be submitted to the Store as well. Until then, just because Store submission isn’t allowed today does not mean you can’t test the proposed app behavior today…like, right now! Here is how:

  1. On Windows, a PWA is really just the W3C standards name for what have been calling Hosted Web Apps. These are apps where the entirety of the content is served from your web server. The advantage of this solution is that your one web code base gracefully scales across the browser as well as a native Windows app. Because you are running as a fully-featured Windows app, you can call Windows Runtime APIs directly from JavaScript all by modifying your server code. There is no reason to make any local changes. The talk goes into a bit more detail about this.

  2. The Start your app section will get you up-and-running with building a HWA really quickly. Just make sure to add the ServiceWorker=“true” value to the appxmanifest to test them out now.

Hopefully this clarifies what I mentioned in my talk in slightly more detail. Let me know if there any questions on what you’ve seen. This is a fun and constantly evolving space, so keep in mind that some things you’ve seen here may change based on your feedback and so on :slight_smile:

Cheers,
Kirupa

This looks awesome. I have a question; can service workers be used as background services in my HTML/JavaScript UWP app? If so, do you have any documentation?

Yes, they absolutely can! The service worker code you would write is identical to what you would write for the web. There is no UWP specific documentation for it outside of ensuring your appxmanifest declaring ServiceWorker = true.

Sounds great. Does the latest insider release for Windows 10 mobile also support these features in Edge/UWP?

I don’t know, but let me get you an answer shortly :slight_smile:

Edit: The answer is that it will be released when ready! No dates to share just yet.

Thanks for looking into this. I use Ionic 2 for my Windows 10 mobile app, and this would be great to use for background services. Guess that I’ll need to wait a little longer.

1 Like

Great session Kirupa. And thanks for sitting down with me to have a casual conversation about Microsoft and Progressive web applications, https://youtu.be/aG2XYgIhaUQ.

1 Like

Congratulation for your presentation. Very interesting to hear Microsoft’s plans. PWAs bring a lot of benefits. I just mention the fact that PWAs engage your customers like a native app would but are less costly and more time efficient.