SlideShare a Scribd company logo
1 of 30
Download to read offline
WTF R PWA’s
What The Feck aRe Progressive Web Applications
By Bob Byron and Mike Wilcox
February 2018
CLUB AJAX
Wikipedia Says…
“Progressive web apps (PWAs) are web applications that are regular web pages
or websites, but can appear to the user like traditional applications or native
mobile applications.”
- Wikipedia
Alex Russell says…
u Reliable – Load instantly and never show the Downasaur, even in uncertain
network conditions.
u Fast – Respond quickly to user interactions with silky smooth animations and
no janky scrolling.
u Engaging – Feels like a natural app on the device with an immersive user
experience.
https://developers.google.com/web/progressive-web-apps/
Bob says…
I like to think of them more as simply anything a native application can do, a
Web Native Application can do and those can be considered PWAs.
u Web Native Applications
u A web application that utilizes the same features found in native applications.
u An application that you don’t realize is HTML based.
Mike says…
PWAs embrace the open web, whereas native (mobile) applications often are
built without standards and deployed from behind walled gardens (app stores).
A PWA evolves from a page in a browser tab to a first class application
PWA Anatomy
PWA advantages over native apps
u low friction of distribution — PWAs eliminate the need to go to the app store,
search for the app, click Install, wait for the download, then open the app.
u discoverability — easily found by search engines.
u linkability — any page/screen can have a direct link, which can be shared easily
u bookmarkability — save that link to access an app’s view directly
u always fresh — no need to go through the app store approval process to push
updates
u universal access — not subject by app stores sometimes arbitrary policies or
(unintended) geographic restrictions
u large data savings, extremely important in emerging markets with expensive
and/or slow Internet access. For example, e-commerce website Konga cut data
usage by 92% for the first load by migrating to a PWA.
PWA Characteristics
u Progressive - Work for every user, regardless of browser choice because they’re built
with progressive enhancement as a core tenet.
u Responsive - Fit any form factor: desktop, mobile, tablet, or forms yet to emerge.
u Connectivity independent - Service workers allow work offline, or on low quality networks.
u App-like - Feel like an app to the user with app-style interactions and navigation.
u Fresh - Always up-to-date thanks to the service worker update process.
u Safe - Served via HTTPS to prevent snooping and ensure content hasn’t been tampered with.
u Discoverable - Are identifiable as “applications” thanks to W3C manifests[6] and service
worker registration scope allowing search engines to find them.
u Re-engageable - Make re-engagement easy through features like push notifications.
u Installable - Allow users to “keep” apps they find most useful on their home screen without
the hassle of an app store.
u Linkable - Easily shared via a URL and do not require complex installation.
https://addyosmani.com/blog/getting-started-with-progressive-web-apps/
PWA-Specific API Features
u Push notifications
u Working offline
u Adding an icon to the home screen
u Being installed into Android (i.e. in the apps drawer and in Settings)
u Receiving intents (open domain pages in your app)
u Triggering the native Android share dialog
u Launching in full-screen
u Persistent auto-login using the Credentials Manager API
u Accessing the filesystem (Chrome and Opera) and reading user-selected files
in any browser
https://medium.com/dev-channel/why-progressive-web-apps-vs-native-is-the-wrong-question-to-ask-fb8555addcbb
PWA Checklist – 1 of 4
u Site is served over https
u Responsive web design
u All URLs must work offline
u Must be able to add application to home screen
u First load must be fast on slow networks and weak devices
u Site supports cross-browser (modern browsers)
u Page Transitions must be snappy, on or off network
u You must be able to get to each page via a URL
https://developers.google.com/web/progressive-web-apps/checklist
PWA Checklist – 2 of 4
u Site’s content must be index-able by search engines
u Schema.org metadata is provided where appropriate
u Social metadata is provided where appropriate
u Canonical URLs
u Use the history API
u Content doesn’t jump as the page loads
u Pressing back must maintain page scroll position
PWA Checklist – 3 of 4
u Inputs aren't obscured by the on screen keyboard
u Content is easily shareable from standalone or full screen mode
u Any app install prompts are not used excessively
u The Add to Home Screen prompt is intercepted
u Site uses cache-first networking
u Site appropriately informs the user when they're offline
PWA Checklist – 4 of 4
u Provide context to the user about how notifications will be used
u UI encouraging users to turn on Push Notifications must not be overly
aggressive
u Site dims the screen when permission request is showing
u Push notifications must be timely, precise and relevant
u Provides controls to enable and disable notifications
What PWAs can’t do
u contacts, calendar and browser bookmarks access (though lack of access to
these could be viewed as a feature by privacy-conscious users)
u alarms
u telephony features — intercept SMSes or calls, send SMS/MMS, get the user’s
phone number, read voice mail, make phone calls without the Dialer dialog
u hardware low-level access: flashlight, atmospheric pressure sensor
u system access: task management, modifying system settings, logs
u registering to handle custom URL schemes and protocol, or file types
https://medium.com/dev-channel/why-progressive-web-apps-vs-native-is-the-wrong-question-to-ask-fb8555addcbb
Details
Why Use HTTPS
u HTTP transfers data that can be sniffed
u Protects your users privacy
u Helps protect the server security
u Referrer data is preserved and can’t be stripped.
u Greater site/page ranking is given to secure sites/pages
u Use Let’s Encrypt: https://letsencrypt.org
Responsive Design
u One application adapts to many devices
u One codebase to debug – fixes apply to all devices
u One server to deliver the content / data
u SEO is the same regardless of device
Adding Your PWA to homepage
u Use a manifest.json file to create a homescreen icon – just like a native application!
u Have your application reference the manifest
u Set your starting URL in the manifest file
u Add custom icons to your manifest file
u Display can be standalone or browser
u Control the Orientation
https://developer.mozilla.org/en-US/docs/Web/Manifest
Example Manifest
{
"short_name":”CoolApp",
"name":”My Cool Application",
"icons":[
{
"src":"launch-icon-1x.png",
"type":"image/png",
"sizes":"48x48"
},
{
"src":"launch-icon-2x.png",
"type":"image/png",
"sizes":"96x96"
},
{
"src":"launch-icon-4x.png",
"type":"image/png",
"sizes":"192x192"
}
],
"start_url":"index.html?launch=true"
}
https://developers.google.com/web/fundamentals/web-app-manifest/
Working offline – use a ServiceWorker
u ServiceWorkers act as a proxy between the app and the server.
u Handle the Online vs Offline experience
u ServiceWorkers asynchronously handle the applications calls
u ServiceWorkers only run under HTTPS
u Ready on Chrome, Firefox, and Samsung Internet
u Ready in Safari 11.1, Edge 17
u https://caniuse.com/#feat=serviceworkers
u https://jakearchibald.github.io/isserviceworkerready/
https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
Service Worker Basic Architecture
Service Worker Cookbook
Testing
Preview your content
u Run a fetch - See the content as google sees it.
https://support.google.com/webmasters/answer/6066468?hl=en
SEO metadata – Schema.org
u Founded by Google, Microsoft, Yahoo, and Yandex as a standard for all
webcrawlers
u Search engines try, but can’t always identify what the data in your site means.
u Microdata identifies the type of data found in your website
u Full list of itemtypes: https://schema.org/docs/full.html
https://schema.org/docs/gs.html
SEO Testing of Metadata
Run test for...
u Ibm.com – identifies a search facility
u Whitehouse.gov – identifies social sites
u Insight.com – identifies web page, corporation, website search, site
navigation
u nytimes.com – tickerSymbol incorrectly defined
https://search.google.com/structured-data/testing-tool
Test how your app handles network
problems
In Chrome
Change your speed - Fast 3G, slow 3G, or take it offline
Use other Speed Testing Tools
u Page Speed - https://developers.google.com/speed/pagespeed/insights/
u WebPageTest – https://www.webpagetest.org/
Cross Browser Testing
u CanIUse.com
u Not a drug legalization site
u Shows the availability of a feature in the common browsers.
u Online tools: http://browsershots.org/
u IE allows you to emulate older IE versions.
u Use Selenium to test each, but you have to write the scripts!
http://www.seleniumhq.org
u Or you can just test all the browsers manually
Demos
u Wiki Offline by Jake Archibald
u Voice Memos by Google
u AirHorner by Paul Kinlan
u Guitar Tuner by Paul lewis
u iFixit by Jeff Posnick
u ServiceWorker Basic Example by Google
u Using ServiceWorkers by Mozilla
CLUB AJAX

More Related Content

What's hot

What's hot (20)

Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Offline-First Progressive Web Apps
Offline-First Progressive Web AppsOffline-First Progressive Web Apps
Offline-First Progressive Web Apps
 
Jws masterclass progressive web apps
Jws masterclass progressive web appsJws masterclass progressive web apps
Jws masterclass progressive web apps
 
Progressive web apps
Progressive web appsProgressive web apps
Progressive web apps
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Progressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting StartedProgressive Web Apps - Overview & Getting Started
Progressive Web Apps - Overview & Getting Started
 
Progressive web apps
 Progressive web apps Progressive web apps
Progressive web apps
 
Basic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web AppsBasic Understanding of Progressive Web Apps
Basic Understanding of Progressive Web Apps
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
 
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
Introduction to Progressive Web Apps, Google Developer Summit, Seoul - South ...
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
 
Anatomy of a Progressive Web App
Anatomy of a Progressive Web AppAnatomy of a Progressive Web App
Anatomy of a Progressive Web App
 
Intro to Progressive Web App Development (using Ionic)
Intro to Progressive Web App Development (using Ionic)Intro to Progressive Web App Development (using Ionic)
Intro to Progressive Web App Development (using Ionic)
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
Secured Development
Secured DevelopmentSecured Development
Secured Development
 
Predictability for the Web
Predictability for the WebPredictability for the Web
Predictability for the Web
 
Brug - Web push notification
Brug  - Web push notificationBrug  - Web push notification
Brug - Web push notification
 
OWASP A7 and A8
OWASP A7 and A8OWASP A7 and A8
OWASP A7 and A8
 

Similar to WTF R PWAs?

Similar to WTF R PWAs? (20)

Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Why Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp FinlandWhy Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp Finland
 
Introduction of Progressive Web App
Introduction of Progressive Web AppIntroduction of Progressive Web App
Introduction of Progressive Web App
 
Checklist for progressive web app development
Checklist for progressive web app developmentChecklist for progressive web app development
Checklist for progressive web app development
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
 
SEMINAR (pwa).pptx
SEMINAR (pwa).pptxSEMINAR (pwa).pptx
SEMINAR (pwa).pptx
 
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddyPWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
 
Pwa.pptx
Pwa.pptxPwa.pptx
Pwa.pptx
 
pwa-170717082930.pdf
pwa-170717082930.pdfpwa-170717082930.pdf
pwa-170717082930.pdf
 
20181023 progressive web_apps_are_here_sfcampua
20181023 progressive web_apps_are_here_sfcampua20181023 progressive web_apps_are_here_sfcampua
20181023 progressive web_apps_are_here_sfcampua
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for Education
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile App
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016
 
The Ultimate Guide to Modern Web App Development.ppt
The Ultimate Guide to Modern Web App Development.pptThe Ultimate Guide to Modern Web App Development.ppt
The Ultimate Guide to Modern Web App Development.ppt
 
Baobab WebSuite overview - Publisher's Toolbox
Baobab WebSuite overview - Publisher's ToolboxBaobab WebSuite overview - Publisher's Toolbox
Baobab WebSuite overview - Publisher's Toolbox
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
 
PWA basics for developers
PWA basics for developersPWA basics for developers
PWA basics for developers
 

More from Mike Wilcox

Webpage Design Basics for Non-Designers
Webpage Design Basics for Non-DesignersWebpage Design Basics for Non-Designers
Webpage Design Basics for Non-Designers
Mike Wilcox
 

More from Mike Wilcox (20)

Accessibility for Fun and Profit
Accessibility for Fun and ProfitAccessibility for Fun and Profit
Accessibility for Fun and Profit
 
Advanced React
Advanced ReactAdvanced React
Advanced React
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need it
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatterns
 
Model View Madness
Model View MadnessModel View Madness
Model View Madness
 
Hardcore JavaScript – Write it Right
Hardcore JavaScript – Write it RightHardcore JavaScript – Write it Right
Hardcore JavaScript – Write it Right
 
The Great Semicolon Debate
The Great Semicolon DebateThe Great Semicolon Debate
The Great Semicolon Debate
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and How
 
Dojo & HTML5
Dojo & HTML5Dojo & HTML5
Dojo & HTML5
 
Webpage Design Basics for Non-Designers
Webpage Design Basics for Non-DesignersWebpage Design Basics for Non-Designers
Webpage Design Basics for Non-Designers
 
Why You Need a Front End Developer
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End Developer
 
A Conversation About REST
A Conversation About RESTA Conversation About REST
A Conversation About REST
 
The Fight Over HTML5
The Fight Over HTML5The Fight Over HTML5
The Fight Over HTML5
 
The Fight Over HTML5
The Fight Over HTML5The Fight Over HTML5
The Fight Over HTML5
 
How to get a Job as a Front End Developer
How to get a Job as a Front End DeveloperHow to get a Job as a Front End Developer
How to get a Job as a Front End Developer
 
The History of HTML5
The History of HTML5The History of HTML5
The History of HTML5
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

WTF R PWAs?

  • 1. WTF R PWA’s What The Feck aRe Progressive Web Applications By Bob Byron and Mike Wilcox February 2018 CLUB AJAX
  • 2. Wikipedia Says… “Progressive web apps (PWAs) are web applications that are regular web pages or websites, but can appear to the user like traditional applications or native mobile applications.” - Wikipedia
  • 3. Alex Russell says… u Reliable – Load instantly and never show the Downasaur, even in uncertain network conditions. u Fast – Respond quickly to user interactions with silky smooth animations and no janky scrolling. u Engaging – Feels like a natural app on the device with an immersive user experience. https://developers.google.com/web/progressive-web-apps/
  • 4. Bob says… I like to think of them more as simply anything a native application can do, a Web Native Application can do and those can be considered PWAs. u Web Native Applications u A web application that utilizes the same features found in native applications. u An application that you don’t realize is HTML based.
  • 5. Mike says… PWAs embrace the open web, whereas native (mobile) applications often are built without standards and deployed from behind walled gardens (app stores). A PWA evolves from a page in a browser tab to a first class application
  • 7. PWA advantages over native apps u low friction of distribution — PWAs eliminate the need to go to the app store, search for the app, click Install, wait for the download, then open the app. u discoverability — easily found by search engines. u linkability — any page/screen can have a direct link, which can be shared easily u bookmarkability — save that link to access an app’s view directly u always fresh — no need to go through the app store approval process to push updates u universal access — not subject by app stores sometimes arbitrary policies or (unintended) geographic restrictions u large data savings, extremely important in emerging markets with expensive and/or slow Internet access. For example, e-commerce website Konga cut data usage by 92% for the first load by migrating to a PWA.
  • 8. PWA Characteristics u Progressive - Work for every user, regardless of browser choice because they’re built with progressive enhancement as a core tenet. u Responsive - Fit any form factor: desktop, mobile, tablet, or forms yet to emerge. u Connectivity independent - Service workers allow work offline, or on low quality networks. u App-like - Feel like an app to the user with app-style interactions and navigation. u Fresh - Always up-to-date thanks to the service worker update process. u Safe - Served via HTTPS to prevent snooping and ensure content hasn’t been tampered with. u Discoverable - Are identifiable as “applications” thanks to W3C manifests[6] and service worker registration scope allowing search engines to find them. u Re-engageable - Make re-engagement easy through features like push notifications. u Installable - Allow users to “keep” apps they find most useful on their home screen without the hassle of an app store. u Linkable - Easily shared via a URL and do not require complex installation. https://addyosmani.com/blog/getting-started-with-progressive-web-apps/
  • 9. PWA-Specific API Features u Push notifications u Working offline u Adding an icon to the home screen u Being installed into Android (i.e. in the apps drawer and in Settings) u Receiving intents (open domain pages in your app) u Triggering the native Android share dialog u Launching in full-screen u Persistent auto-login using the Credentials Manager API u Accessing the filesystem (Chrome and Opera) and reading user-selected files in any browser https://medium.com/dev-channel/why-progressive-web-apps-vs-native-is-the-wrong-question-to-ask-fb8555addcbb
  • 10. PWA Checklist – 1 of 4 u Site is served over https u Responsive web design u All URLs must work offline u Must be able to add application to home screen u First load must be fast on slow networks and weak devices u Site supports cross-browser (modern browsers) u Page Transitions must be snappy, on or off network u You must be able to get to each page via a URL https://developers.google.com/web/progressive-web-apps/checklist
  • 11. PWA Checklist – 2 of 4 u Site’s content must be index-able by search engines u Schema.org metadata is provided where appropriate u Social metadata is provided where appropriate u Canonical URLs u Use the history API u Content doesn’t jump as the page loads u Pressing back must maintain page scroll position
  • 12. PWA Checklist – 3 of 4 u Inputs aren't obscured by the on screen keyboard u Content is easily shareable from standalone or full screen mode u Any app install prompts are not used excessively u The Add to Home Screen prompt is intercepted u Site uses cache-first networking u Site appropriately informs the user when they're offline
  • 13. PWA Checklist – 4 of 4 u Provide context to the user about how notifications will be used u UI encouraging users to turn on Push Notifications must not be overly aggressive u Site dims the screen when permission request is showing u Push notifications must be timely, precise and relevant u Provides controls to enable and disable notifications
  • 14. What PWAs can’t do u contacts, calendar and browser bookmarks access (though lack of access to these could be viewed as a feature by privacy-conscious users) u alarms u telephony features — intercept SMSes or calls, send SMS/MMS, get the user’s phone number, read voice mail, make phone calls without the Dialer dialog u hardware low-level access: flashlight, atmospheric pressure sensor u system access: task management, modifying system settings, logs u registering to handle custom URL schemes and protocol, or file types https://medium.com/dev-channel/why-progressive-web-apps-vs-native-is-the-wrong-question-to-ask-fb8555addcbb
  • 16. Why Use HTTPS u HTTP transfers data that can be sniffed u Protects your users privacy u Helps protect the server security u Referrer data is preserved and can’t be stripped. u Greater site/page ranking is given to secure sites/pages u Use Let’s Encrypt: https://letsencrypt.org
  • 17. Responsive Design u One application adapts to many devices u One codebase to debug – fixes apply to all devices u One server to deliver the content / data u SEO is the same regardless of device
  • 18. Adding Your PWA to homepage u Use a manifest.json file to create a homescreen icon – just like a native application! u Have your application reference the manifest u Set your starting URL in the manifest file u Add custom icons to your manifest file u Display can be standalone or browser u Control the Orientation https://developer.mozilla.org/en-US/docs/Web/Manifest
  • 19. Example Manifest { "short_name":”CoolApp", "name":”My Cool Application", "icons":[ { "src":"launch-icon-1x.png", "type":"image/png", "sizes":"48x48" }, { "src":"launch-icon-2x.png", "type":"image/png", "sizes":"96x96" }, { "src":"launch-icon-4x.png", "type":"image/png", "sizes":"192x192" } ], "start_url":"index.html?launch=true" } https://developers.google.com/web/fundamentals/web-app-manifest/
  • 20. Working offline – use a ServiceWorker u ServiceWorkers act as a proxy between the app and the server. u Handle the Online vs Offline experience u ServiceWorkers asynchronously handle the applications calls u ServiceWorkers only run under HTTPS u Ready on Chrome, Firefox, and Samsung Internet u Ready in Safari 11.1, Edge 17 u https://caniuse.com/#feat=serviceworkers u https://jakearchibald.github.io/isserviceworkerready/ https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
  • 21. Service Worker Basic Architecture Service Worker Cookbook
  • 23. Preview your content u Run a fetch - See the content as google sees it. https://support.google.com/webmasters/answer/6066468?hl=en
  • 24. SEO metadata – Schema.org u Founded by Google, Microsoft, Yahoo, and Yandex as a standard for all webcrawlers u Search engines try, but can’t always identify what the data in your site means. u Microdata identifies the type of data found in your website u Full list of itemtypes: https://schema.org/docs/full.html https://schema.org/docs/gs.html
  • 25. SEO Testing of Metadata Run test for... u Ibm.com – identifies a search facility u Whitehouse.gov – identifies social sites u Insight.com – identifies web page, corporation, website search, site navigation u nytimes.com – tickerSymbol incorrectly defined https://search.google.com/structured-data/testing-tool
  • 26. Test how your app handles network problems In Chrome Change your speed - Fast 3G, slow 3G, or take it offline
  • 27. Use other Speed Testing Tools u Page Speed - https://developers.google.com/speed/pagespeed/insights/ u WebPageTest – https://www.webpagetest.org/
  • 28. Cross Browser Testing u CanIUse.com u Not a drug legalization site u Shows the availability of a feature in the common browsers. u Online tools: http://browsershots.org/ u IE allows you to emulate older IE versions. u Use Selenium to test each, but you have to write the scripts! http://www.seleniumhq.org u Or you can just test all the browsers manually
  • 29. Demos u Wiki Offline by Jake Archibald u Voice Memos by Google u AirHorner by Paul Kinlan u Guitar Tuner by Paul lewis u iFixit by Jeff Posnick u ServiceWorker Basic Example by Google u Using ServiceWorkers by Mozilla