Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PWAs, Microsoft Edge, and More!

PWAs, Microsoft Edge, and More!

A talk around PWAs and and what we are doing on the Edge team to support them. This was presented at the MS NERD building as part of the Boston Frontend Developers Meetup group.

Avatar for Kirupa Chinnathambi

Kirupa Chinnathambi

September 26, 2016

Other Decks in Programming

Transcript

  1. A lot of what you are about to see is

    forward-looking. Some of the information may change. Things may get delayed. Things may ship ahead of schedule. Things may never ship at all.
  2. These are web apps that: • Work offline / reliably

    under poor network conditions • Support push notifications • Can be launched from an icon on the home screen (on Android devices) • Start and run really fast!
  3. You Need a Web App Make sure it runs in

    the browser and is served over HTTPs. (You really shouldn’t do anything special.)
  4. { "lang": "en", "short_name": "Wash Post", "name": "The Washington Post",

    "icons": [ { "src": "img/launcher-icon-2x.png", "sizes": "96x96", "type": "image/png" }, { "src": "img/launcher-icon-4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": "/pwa/?utm_source=homescreen", "display": "standalone", "orientation": "portrait", "background_color": "black" } Web Application Manifest This is nothing more than a JSON file that provides information about the web site. With this information, we can do all sorts of app-like things.
  5. Service Workers Service workers act as proxy servers that sit

    between web applications, the browser, and the network (when available). They make it easy for you to: 1. Create offline experiences 2. Intercept network requests 3. Deal with caching properly 4. Access push notifications and background sync APIs
  6. Provide a version that satisfies the largest addressable audience. Layer

    on additional (cooler!) functionality based on hardware / browser / bandwidth capabilities.
  7. On devices/browsers that support more advanced technologies: • Web Notifications

    • Caching/Offline • App Icons (Something like Modernizr helps with all of this!)
  8. Since 2011 as part of the Windows 8 developer experience,

    we made HTML/CSS/JavaScript one of the primary languages you can use to build native Windows applications.
  9. Hosted Web Apps Your app content is served from a

    public URL. Packaged Web Apps Your app content is entirely local and part of your application.
  10. When your web site is run as an app, you

    get a Start menu icon, integration with the Settings UIs, better security, and resource utilization for free.
  11. If you want to, you can enhance your app to

    integrate more deeply with the OS/Hardware.
  12. if (typeof Windows !== "undefined") { // Windows specific code

    goes here } They way to detect if your content is running as a Windows app:
  13. By creating a web app manifest, you are sending a

    clear signal that you want to be treated like an app.
  14. If you built your offline/caching solution around Progressive Enhancement principles,

    your apps will automatically benefit once Service Workers support gets added!
  15. 1. You should build PWAs today 2. Use Progressive Enhancement

    3. Your PWAs on Windows will be treated just like a native app