SlideShare a Scribd company logo
1 of 48
Stop the Internet,
I want to go offline
Boyan Mihaylov
@bmihaylov
@bmihaylov | BuildStuff 2016 2
We live in a connected world
https://c1app.wordpress.com/2015/02/02/mobile-apps-a-simple-overview/social-media-network-connection-and-communication-in-the-global_z1j0gjo_/
@bmihaylov | BuildStuff 2016 3
SLOWEST FASTEST
Internet speed worldwide
https://telegraphtravelmaps.carto.com/viz/b0a43e76-40bf-11e5-bfd4-0e6e1df11cbf/public_map
Working while travelling
@bmihaylov | BuildStuff 2016 4
https://www.wired.com/wp-content/uploads/blogs/wiredenterprise/wp-content/uploads/2013/09/docker-jungle.jpg
Working while travelling
@bmihaylov | BuildStuff 2016 5
https://www.selectlegal.co.uk/wp-content/uploads/2015/07/Man-on-train.jpg
@bmihaylov | BuildStuff 2016 6
@bmihaylov | BuildStuff 2016 7
@bmihaylov | BuildStuff 2016 8
5
Principles
for great
offline
experience
@bmihaylov | BuildStuff 2016 9
@bmihaylov | BuildStuff 2016 10
#1
Degrade
gracefully as
the network
connection
changes
@bmihaylov | BuildStuff 2016 11
#2
Provide clear
feedback
about the my
actions
@bmihaylov | BuildStuff 2016 12
#3
Give me
constant
access to the
content I
care about
@bmihaylov | BuildStuff 2016 13
#4
Content is
mutable, no
matter if I am
online or
offline
@bmihaylov | BuildStuff 2016 14
#5
Remember
my recent
activity for
me
@bmihaylov | BuildStuff 2016 15
Traditional
caching
approaches
@bmihaylov | BuildStuff 2016 16
HTTP Headers
@bmihaylov | BuildStuff 2016 17
GET /build-stuff.html HTTP/1.1
…
HTTP 1/1 200 OK
Cache-Control: public, max-age=86400
Expires: Tue, 22 Nov 2016, 20:00:00 GMT
Last-Modified: Wed, 16 Nov 2016, 08:00:00 GMT
ETag: “5485fac7-ae74”
…
Request
Response
Resource versioning
@bmihaylov | BuildStuff 2016 18
…
<link href="/css/site.css" rel="stylesheet" />
<link href="/css/baske.css?v=2" rel="stylesheet" />
…
<script src="/js/moment-2.8.3.js"></script>
<script src="/js/prettyCheckable.js?v=1"></script>
<script src="/js/customSelect.js?v=1"></script>
<script src="/js/app/basket.js?v=2"></script>
<script src="/js/app/BasketController.js?v=2"></script>
…
<script src="/js/app-bundle.js?v=53e32af"></script>
…
Cookies
@bmihaylov | BuildStuff 2016 19
GET /build-stuff.html HTTP/1.1
…
HTTP 1/1 200 OK
Set-Cookie: i-am-cool=true;
…
#1 Request
#1 Response
GET /build-stuff.html HTTP/1.1
Cookie: i-am-cool=true;
…
#2 Request
3rd-party plug-ins
@bmihaylov | BuildStuff 2016 20
@bmihaylov | BuildStuff 2016 21
Application cache
@bmihaylov | BuildStuff 2016 22
CACHE MANIFEST
# 2016-11-18 v1
CACHE:
welcome.html
css/style.css
img/title.png
NETWORK:
*
FALLBACK:
/ offline.html
manifest.appcache Usage
<html manifest="manifest.appcache">
…
– Caching the manifest file?
– Not flexible enough
– Hard to debug
– Deprecated
+ Good browser support
Web storage
@bmihaylov | BuildStuff 2016 23
localStorage.setItem("conf", "BuildStuff");
const conf = localStorage.getItem("conf");
localStorage.removeItem("conf");
localStorage.clear();
sessionStorage.setItem("mySession", "offline");
+ Key-value store
+ Per session or permanent
+ Cross-browser support
– Serialization / deserialization
– No transactions
– Limited space
Web SQL database
@bmihaylov | BuildStuff 2016 24
+ SQLite in the browser
+ Relational DB advantages
– Minimal browser support
– Deprecated
const db = openDatabase("mydb", "1.0", "Test DB", 50*1024*2014);
db.transaction(tx => {
tx.executeSql("CREATE TABLE IT NOT EXISTS Conf (id unique, name)");
tx.executeSql("INSERT INTO Conf VALUES (1, 'BuildStuff'");
});
indexedDB
@bmihaylov | BuildStuff 2016 25
+ Storage of significant amounts
of structured data (+ blobs)
+ Transactional support
+ (Good) browser support
const dbRequest = indexedDB.open("ConfDB");
dbRequest.onupgradeneeded = () => {
dbRequest.result
.createObjectStore("conf", { keyPath: "id" })
.put({ id: 1, name: "BuildStuff" });
};
dbRequest.onsuccess = () => {
const getRequest = dbRequest.result
.objectStore("conf").get(1);
getRequest.onsuccess = () => { /* getRequest.result.name */ };
};
– Complex for simple scenarios
FileSystem API
@bmihaylov | BuildStuff 2016 26
+ A sandboxed file system
+ Store binary content
– May ask for extra quota
– Only supported in Chrome
– Non-standard
window.webkitStorageInfo
.requestQuota(PERSISTENT, 1024*1024, (quota) => {
window.requestFileSystem(PERSISTENT, quota, onInit, onError);
}, onError);
function onInit(fs) {
fs.root.getFile(
"log.txt", { create: true, exclusive: true },
(fileEntry) => { /* fileEntry.name */ },
onError);
}
Service Worker
A script running in the background
Even when the browser is closed
Acts as a proxy between the browser and
the network (when available)
Programmatic and controllable
Cache API
27@bmihaylov | BuildStuff 2016
Service Worker lifecycle
@bmihaylov | BuildStuff 2016 28
Installing Activated Idle
Fetch /
message
Terminated
Error
Service Worker – register
@bmihaylov | BuildStuff 2016 29
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("app-install.js")
.then(function() {
console.log("Service worker has been installed");
}, function(error) {
console.log("Oops!", error);
});
} else {
console.log("No service workers support for this browser");
}
</script>
Service Worker – install
@bmihaylov | BuildStuff 2016 30
const CACHE_NAME = "app.cache.v1";
this.addEventListener("install", (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => {
return cache.addAll([
"/index.html",
"/css/style.css",
"/js/app.js"
]);
});
);
});
…
app-install.js
Service Worker – fetch
@bmihaylov | BuildStuff 2016 31
app-install.js
…
this.addEventListener("fetch", (event) => {
event.respondWith(
caches.match(event.request).then((response) => {
return response || fetch(event.request);
});
);
});
…
Service Worker specifics
HTTPs only
Asynchronous, promise-based
Not working with localStorage
indexedDB only
No access to DOM
Isn’t tied to a particular page
32@bmihaylov | BuildStuff 2016
Caching
strategies
using
service
workers
@bmihaylov | BuildStuff 2016 33
https://jakearchibald.com/2014/offline-cookbook/
Network only
@bmihaylov | BuildStuff 2016 34
www.
1 2
3
Scenarios
• Analytics requests
• Non-GET requests
Cache only
@bmihaylov | BuildStuff 2016 35
www.
1 2
3
Scenarios
• The static part of your app
Cache, falling back to network
@bmihaylov | BuildStuff 2016 36
www.
1
2
3
4
Scenarios
• The majority of requests
when building offline-first
app
Network, falling back to cache
@bmihaylov | BuildStuff 2016 37
www.
1
3
2
4
Scenarios
• Online users will always
get the latest content
• Offline users will get older
content
Cache & update
@bmihaylov | BuildStuff 2016 38
www.
1
2
2
3
4
Scenarios
• You don’t mind showing
old content for a while
Cache, update, refresh
@bmihaylov | BuildStuff 2016 39
www.
1
2
2
3
4
4
Scenarios
• Content that changes often
(fx., game score, social
media timeline)
Network & cache race
@bmihaylov | BuildStuff 2016 40
www.
1
2
2
3
3
Scenarios
• Small “non-important”
assets
• Where performance
is vital
Beyond typical scenarios
@bmihaylov | BuildStuff 2016 41
Network status Background sync Push notifications
Is Service Worker ready?
@bmihaylov | BuildStuff 2016 42
11 14 10
9.1
TP
10
9.3
all
4.4
4.4.4
49
50
51
52
54
53
55
56
57
52
51
49
41
42
43
53 53
IE Edge Firefox Chrome Safari Opera iOS Safari
Opera
Mini
Android
Browser
Chrome
for
Android
Myths about
working
offline
@bmihaylov | BuildStuff 2016 43
Myth #1:
4G is
everywhere
@bmihaylov | BuildStuff 2016 44
Myth #2:
Offline
scenarios
are rare
@bmihaylov | BuildStuff 2016 45
Myth #3:
Local data
is used only
for offline apps
@bmihaylov | BuildStuff 2016 46
Myth #4:
Current
web standards
are of no use
@bmihaylov | BuildStuff 2016 47
48
Thank you, BuildStuff!
@bmihaylov | BuildStuff 2016
hey@boyan.in
@bmihaylov
After party

More Related Content

What's hot

Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...COMAQA.BY
 
#CodefreshLive Event
#CodefreshLive Event#CodefreshLive Event
#CodefreshLive EventCodefresh
 
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceEnhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceNico Meisenzahl
 
BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)Codit
 
C# development workflow @ criteo
C# development workflow @ criteoC# development workflow @ criteo
C# development workflow @ criteoIbrahim Abubakari
 
Why reinvent the wheel at Criteo?
Why reinvent the wheel at Criteo? Why reinvent the wheel at Criteo?
Why reinvent the wheel at Criteo? Criteolabs
 
Moving Kentico Cms To The Azure
Moving Kentico Cms To The AzureMoving Kentico Cms To The Azure
Moving Kentico Cms To The AzureMichal Neuwirth
 
Web And Cloud Tour 2015 - ASP.NET 5
Web And Cloud Tour 2015 -  ASP.NET 5 Web And Cloud Tour 2015 -  ASP.NET 5
Web And Cloud Tour 2015 - ASP.NET 5 Marc Rubiño
 
Overview of modern software ecosystem for big data analysis
Overview of modern software ecosystem for big data analysisOverview of modern software ecosystem for big data analysis
Overview of modern software ecosystem for big data analysisMichael Bryzek
 
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 [Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 Yunho Maeng
 
VueJs Workshop
VueJs WorkshopVueJs Workshop
VueJs WorkshopUnfold UI
 
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...Nico Meisenzahl
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017 ElifTech
 
Asp.net visual studio 2013
Asp.net   visual studio 2013Asp.net   visual studio 2013
Asp.net visual studio 2013Tyrone Moodley
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysCarlos Taborda
 

What's hot (20)

Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
#CodefreshLive Event
#CodefreshLive Event#CodefreshLive Event
#CodefreshLive Event
 
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceEnhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
 
Tce automation-d4
Tce automation-d4Tce automation-d4
Tce automation-d4
 
BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)
 
C# development workflow @ criteo
C# development workflow @ criteoC# development workflow @ criteo
C# development workflow @ criteo
 
Why reinvent the wheel at Criteo?
Why reinvent the wheel at Criteo? Why reinvent the wheel at Criteo?
Why reinvent the wheel at Criteo?
 
Web view
Web viewWeb view
Web view
 
Moving Kentico Cms To The Azure
Moving Kentico Cms To The AzureMoving Kentico Cms To The Azure
Moving Kentico Cms To The Azure
 
Quick workflow of a nodejs api
Quick workflow of a nodejs apiQuick workflow of a nodejs api
Quick workflow of a nodejs api
 
Web And Cloud Tour 2015 - ASP.NET 5
Web And Cloud Tour 2015 -  ASP.NET 5 Web And Cloud Tour 2015 -  ASP.NET 5
Web And Cloud Tour 2015 - ASP.NET 5
 
Overview of modern software ecosystem for big data analysis
Overview of modern software ecosystem for big data analysisOverview of modern software ecosystem for big data analysis
Overview of modern software ecosystem for big data analysis
 
Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015
 
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 [Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발
 
VueJs Workshop
VueJs WorkshopVueJs Workshop
VueJs Workshop
 
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
 
JS digest. October 2017
JS digest. October 2017 JS digest. October 2017
JS digest. October 2017
 
Sprint 67
Sprint 67Sprint 67
Sprint 67
 
Asp.net visual studio 2013
Asp.net   visual studio 2013Asp.net   visual studio 2013
Asp.net visual studio 2013
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anyways
 

Similar to Stop the internet, i want to go offline

Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure FunctionsShahed Chowdhuri
 
Bringing JAMStack to the Enterprise
Bringing JAMStack to the EnterpriseBringing JAMStack to the Enterprise
Bringing JAMStack to the EnterpriseC4Media
 
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...Naoki (Neo) SATO
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryOlivier DASINI
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APIBuilding a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APICisco DevNet
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerNic Raboy
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'sAntônio Roberto Silva
 
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Codemotion
 
Web 3.12: A browser to make us proud (GUADEC 2014)
Web 3.12: A browser to make us proud (GUADEC 2014)Web 3.12: A browser to make us proud (GUADEC 2014)
Web 3.12: A browser to make us proud (GUADEC 2014)Igalia
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Matt Raible
 
New WSO2 Enterprise Integrator Focuses on Integration Developer Productivity
New WSO2 Enterprise Integrator Focuses on Integration Developer ProductivityNew WSO2 Enterprise Integrator Focuses on Integration Developer Productivity
New WSO2 Enterprise Integrator Focuses on Integration Developer ProductivityWSO2
 
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Red Hat Developers
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
Now you see me... Adaptive Web Design and Development
Now you see me... Adaptive Web Design and DevelopmentNow you see me... Adaptive Web Design and Development
Now you see me... Adaptive Web Design and DevelopmentJonas Päckos
 
Supercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuerySupercharge your data analytics with BigQuery
Supercharge your data analytics with BigQueryMárton Kodok
 
My way to clean android (EN) - Android day salamanca edition
My way to clean android (EN) - Android day salamanca editionMy way to clean android (EN) - Android day salamanca edition
My way to clean android (EN) - Android day salamanca editionChristian Panadero
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchAppsBradley Holt
 
Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...
Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...
Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...Amazon Web Services
 
MongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch TutorialMongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch TutorialMongoDB
 

Similar to Stop the internet, i want to go offline (20)

Going Serverless with Azure Functions
Going Serverless with Azure FunctionsGoing Serverless with Azure Functions
Going Serverless with Azure Functions
 
Bringing JAMStack to the Enterprise
Bringing JAMStack to the EnterpriseBringing JAMStack to the Enterprise
Bringing JAMStack to the Enterprise
 
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features Summary
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APIBuilding a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
 
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
 
Tech friday 22.01.2016
Tech friday 22.01.2016Tech friday 22.01.2016
Tech friday 22.01.2016
 
Web 3.12: A browser to make us proud (GUADEC 2014)
Web 3.12: A browser to make us proud (GUADEC 2014)Web 3.12: A browser to make us proud (GUADEC 2014)
Web 3.12: A browser to make us proud (GUADEC 2014)
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
 
New WSO2 Enterprise Integrator Focuses on Integration Developer Productivity
New WSO2 Enterprise Integrator Focuses on Integration Developer ProductivityNew WSO2 Enterprise Integrator Focuses on Integration Developer Productivity
New WSO2 Enterprise Integrator Focuses on Integration Developer Productivity
 
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
Now you see me... Adaptive Web Design and Development
Now you see me... Adaptive Web Design and DevelopmentNow you see me... Adaptive Web Design and Development
Now you see me... Adaptive Web Design and Development
 
Supercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuerySupercharge your data analytics with BigQuery
Supercharge your data analytics with BigQuery
 
My way to clean android (EN) - Android day salamanca edition
My way to clean android (EN) - Android day salamanca editionMy way to clean android (EN) - Android day salamanca edition
My way to clean android (EN) - Android day salamanca edition
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...
Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...
Expedite the development lifecycle with MongoDB and serverless - DEM02 - Sant...
 
MongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch TutorialMongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch Tutorial
 

More from Boyan Mihaylov

How WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularHow WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularBoyan Mihaylov
 
Crafting a robust deployment pipeline in finance
Crafting a robust deployment pipeline in financeCrafting a robust deployment pipeline in finance
Crafting a robust deployment pipeline in financeBoyan Mihaylov
 
Using improv techniques for better agile teams
Using improv techniques for better agile teamsUsing improv techniques for better agile teams
Using improv techniques for better agile teamsBoyan Mihaylov
 
Web assembly brings the web to a new era
Web assembly brings the web to a new eraWeb assembly brings the web to a new era
Web assembly brings the web to a new eraBoyan Mihaylov
 
Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?Boyan Mihaylov
 
Lean or agile, software architecture is fragile
Lean or agile, software architecture is fragileLean or agile, software architecture is fragile
Lean or agile, software architecture is fragileBoyan Mihaylov
 
Software architecture also needs agile
Software architecture also needs agileSoftware architecture also needs agile
Software architecture also needs agileBoyan Mihaylov
 
Agile software architecture
Agile software architectureAgile software architecture
Agile software architectureBoyan Mihaylov
 
Component-driven development with AngularJS
Component-driven development with AngularJSComponent-driven development with AngularJS
Component-driven development with AngularJSBoyan Mihaylov
 
Bringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBoyan Mihaylov
 
Identifying methods for measuring emotions
Identifying methods for measuring emotionsIdentifying methods for measuring emotions
Identifying methods for measuring emotionsBoyan Mihaylov
 

More from Boyan Mihaylov (16)

How WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularHow WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for Angular
 
Crafting a robust deployment pipeline in finance
Crafting a robust deployment pipeline in financeCrafting a robust deployment pipeline in finance
Crafting a robust deployment pipeline in finance
 
Using improv techniques for better agile teams
Using improv techniques for better agile teamsUsing improv techniques for better agile teams
Using improv techniques for better agile teams
 
Web assembly brings the web to a new era
Web assembly brings the web to a new eraWeb assembly brings the web to a new era
Web assembly brings the web to a new era
 
Shifting to agile
Shifting to agileShifting to agile
Shifting to agile
 
Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?Is WebAssembly the killer of JavaScript?
Is WebAssembly the killer of JavaScript?
 
Lean or agile, software architecture is fragile
Lean or agile, software architecture is fragileLean or agile, software architecture is fragile
Lean or agile, software architecture is fragile
 
Software architecture also needs agile
Software architecture also needs agileSoftware architecture also needs agile
Software architecture also needs agile
 
Flux architecture
Flux architectureFlux architecture
Flux architecture
 
AngularJS 2.0
AngularJS 2.0AngularJS 2.0
AngularJS 2.0
 
To SPA or not to SPA
To SPA or not to SPATo SPA or not to SPA
To SPA or not to SPA
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
Agile software architecture
Agile software architectureAgile software architecture
Agile software architecture
 
Component-driven development with AngularJS
Component-driven development with AngularJSComponent-driven development with AngularJS
Component-driven development with AngularJS
 
Bringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJSBringing the light to the client with KnockoutJS
Bringing the light to the client with KnockoutJS
 
Identifying methods for measuring emotions
Identifying methods for measuring emotionsIdentifying methods for measuring emotions
Identifying methods for measuring emotions
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 

Stop the internet, i want to go offline

  • 1. Stop the Internet, I want to go offline Boyan Mihaylov @bmihaylov
  • 2. @bmihaylov | BuildStuff 2016 2 We live in a connected world https://c1app.wordpress.com/2015/02/02/mobile-apps-a-simple-overview/social-media-network-connection-and-communication-in-the-global_z1j0gjo_/
  • 3. @bmihaylov | BuildStuff 2016 3 SLOWEST FASTEST Internet speed worldwide https://telegraphtravelmaps.carto.com/viz/b0a43e76-40bf-11e5-bfd4-0e6e1df11cbf/public_map
  • 4. Working while travelling @bmihaylov | BuildStuff 2016 4 https://www.wired.com/wp-content/uploads/blogs/wiredenterprise/wp-content/uploads/2013/09/docker-jungle.jpg
  • 5. Working while travelling @bmihaylov | BuildStuff 2016 5 https://www.selectlegal.co.uk/wp-content/uploads/2015/07/Man-on-train.jpg
  • 10. @bmihaylov | BuildStuff 2016 10 #1 Degrade gracefully as the network connection changes
  • 11. @bmihaylov | BuildStuff 2016 11 #2 Provide clear feedback about the my actions
  • 12. @bmihaylov | BuildStuff 2016 12 #3 Give me constant access to the content I care about
  • 13. @bmihaylov | BuildStuff 2016 13 #4 Content is mutable, no matter if I am online or offline
  • 14. @bmihaylov | BuildStuff 2016 14 #5 Remember my recent activity for me
  • 17. HTTP Headers @bmihaylov | BuildStuff 2016 17 GET /build-stuff.html HTTP/1.1 … HTTP 1/1 200 OK Cache-Control: public, max-age=86400 Expires: Tue, 22 Nov 2016, 20:00:00 GMT Last-Modified: Wed, 16 Nov 2016, 08:00:00 GMT ETag: “5485fac7-ae74” … Request Response
  • 18. Resource versioning @bmihaylov | BuildStuff 2016 18 … <link href="/css/site.css" rel="stylesheet" /> <link href="/css/baske.css?v=2" rel="stylesheet" /> … <script src="/js/moment-2.8.3.js"></script> <script src="/js/prettyCheckable.js?v=1"></script> <script src="/js/customSelect.js?v=1"></script> <script src="/js/app/basket.js?v=2"></script> <script src="/js/app/BasketController.js?v=2"></script> … <script src="/js/app-bundle.js?v=53e32af"></script> …
  • 19. Cookies @bmihaylov | BuildStuff 2016 19 GET /build-stuff.html HTTP/1.1 … HTTP 1/1 200 OK Set-Cookie: i-am-cool=true; … #1 Request #1 Response GET /build-stuff.html HTTP/1.1 Cookie: i-am-cool=true; … #2 Request
  • 20. 3rd-party plug-ins @bmihaylov | BuildStuff 2016 20
  • 22. Application cache @bmihaylov | BuildStuff 2016 22 CACHE MANIFEST # 2016-11-18 v1 CACHE: welcome.html css/style.css img/title.png NETWORK: * FALLBACK: / offline.html manifest.appcache Usage <html manifest="manifest.appcache"> … – Caching the manifest file? – Not flexible enough – Hard to debug – Deprecated + Good browser support
  • 23. Web storage @bmihaylov | BuildStuff 2016 23 localStorage.setItem("conf", "BuildStuff"); const conf = localStorage.getItem("conf"); localStorage.removeItem("conf"); localStorage.clear(); sessionStorage.setItem("mySession", "offline"); + Key-value store + Per session or permanent + Cross-browser support – Serialization / deserialization – No transactions – Limited space
  • 24. Web SQL database @bmihaylov | BuildStuff 2016 24 + SQLite in the browser + Relational DB advantages – Minimal browser support – Deprecated const db = openDatabase("mydb", "1.0", "Test DB", 50*1024*2014); db.transaction(tx => { tx.executeSql("CREATE TABLE IT NOT EXISTS Conf (id unique, name)"); tx.executeSql("INSERT INTO Conf VALUES (1, 'BuildStuff'"); });
  • 25. indexedDB @bmihaylov | BuildStuff 2016 25 + Storage of significant amounts of structured data (+ blobs) + Transactional support + (Good) browser support const dbRequest = indexedDB.open("ConfDB"); dbRequest.onupgradeneeded = () => { dbRequest.result .createObjectStore("conf", { keyPath: "id" }) .put({ id: 1, name: "BuildStuff" }); }; dbRequest.onsuccess = () => { const getRequest = dbRequest.result .objectStore("conf").get(1); getRequest.onsuccess = () => { /* getRequest.result.name */ }; }; – Complex for simple scenarios
  • 26. FileSystem API @bmihaylov | BuildStuff 2016 26 + A sandboxed file system + Store binary content – May ask for extra quota – Only supported in Chrome – Non-standard window.webkitStorageInfo .requestQuota(PERSISTENT, 1024*1024, (quota) => { window.requestFileSystem(PERSISTENT, quota, onInit, onError); }, onError); function onInit(fs) { fs.root.getFile( "log.txt", { create: true, exclusive: true }, (fileEntry) => { /* fileEntry.name */ }, onError); }
  • 27. Service Worker A script running in the background Even when the browser is closed Acts as a proxy between the browser and the network (when available) Programmatic and controllable Cache API 27@bmihaylov | BuildStuff 2016
  • 28. Service Worker lifecycle @bmihaylov | BuildStuff 2016 28 Installing Activated Idle Fetch / message Terminated Error
  • 29. Service Worker – register @bmihaylov | BuildStuff 2016 29 <script> if ("serviceWorker" in navigator) { navigator.serviceWorker.register("app-install.js") .then(function() { console.log("Service worker has been installed"); }, function(error) { console.log("Oops!", error); }); } else { console.log("No service workers support for this browser"); } </script>
  • 30. Service Worker – install @bmihaylov | BuildStuff 2016 30 const CACHE_NAME = "app.cache.v1"; this.addEventListener("install", (event) => { event.waitUntil( caches.open(CACHE_NAME).then((cache) => { return cache.addAll([ "/index.html", "/css/style.css", "/js/app.js" ]); }); ); }); … app-install.js
  • 31. Service Worker – fetch @bmihaylov | BuildStuff 2016 31 app-install.js … this.addEventListener("fetch", (event) => { event.respondWith( caches.match(event.request).then((response) => { return response || fetch(event.request); }); ); }); …
  • 32. Service Worker specifics HTTPs only Asynchronous, promise-based Not working with localStorage indexedDB only No access to DOM Isn’t tied to a particular page 32@bmihaylov | BuildStuff 2016
  • 33. Caching strategies using service workers @bmihaylov | BuildStuff 2016 33 https://jakearchibald.com/2014/offline-cookbook/
  • 34. Network only @bmihaylov | BuildStuff 2016 34 www. 1 2 3 Scenarios • Analytics requests • Non-GET requests
  • 35. Cache only @bmihaylov | BuildStuff 2016 35 www. 1 2 3 Scenarios • The static part of your app
  • 36. Cache, falling back to network @bmihaylov | BuildStuff 2016 36 www. 1 2 3 4 Scenarios • The majority of requests when building offline-first app
  • 37. Network, falling back to cache @bmihaylov | BuildStuff 2016 37 www. 1 3 2 4 Scenarios • Online users will always get the latest content • Offline users will get older content
  • 38. Cache & update @bmihaylov | BuildStuff 2016 38 www. 1 2 2 3 4 Scenarios • You don’t mind showing old content for a while
  • 39. Cache, update, refresh @bmihaylov | BuildStuff 2016 39 www. 1 2 2 3 4 4 Scenarios • Content that changes often (fx., game score, social media timeline)
  • 40. Network & cache race @bmihaylov | BuildStuff 2016 40 www. 1 2 2 3 3 Scenarios • Small “non-important” assets • Where performance is vital
  • 41. Beyond typical scenarios @bmihaylov | BuildStuff 2016 41 Network status Background sync Push notifications
  • 42. Is Service Worker ready? @bmihaylov | BuildStuff 2016 42 11 14 10 9.1 TP 10 9.3 all 4.4 4.4.4 49 50 51 52 54 53 55 56 57 52 51 49 41 42 43 53 53 IE Edge Firefox Chrome Safari Opera iOS Safari Opera Mini Android Browser Chrome for Android
  • 44. Myth #1: 4G is everywhere @bmihaylov | BuildStuff 2016 44
  • 46. Myth #3: Local data is used only for offline apps @bmihaylov | BuildStuff 2016 46
  • 47. Myth #4: Current web standards are of no use @bmihaylov | BuildStuff 2016 47
  • 48. 48 Thank you, BuildStuff! @bmihaylov | BuildStuff 2016 hey@boyan.in @bmihaylov After party