SlideShare a Scribd company logo
The State of Modern JavaScript
and Web in 2020
Alexey Kupriyanenko, R&D manager
Wix.com
The frontend world is moving really fast
% of Pages Loaded via HTTPS
Modern JavaScript is optimized
What you build is super rich and
complex
USE NOW
DON’T WAIT!
Service Workers -
benefits and
costs
make your app work much
faster.
Well known
benefits
▪ Requests can skip the network entirely
▪ Stale response can be returned
immediately
Automatically store the bytecode
representation of JS in the cache
parse compile execute
Automatically store the bytecode
representation of JS in the cache
parse compile execute
cached
But, Service Worker startup time
isn’t free
Best case
SW asleep
Slow
cache
No SW
Cache
miss
Worst case
SW Cache latency Network latency
SW Boot
latency
Header
Navigation request for full content
Content
Navigation Request
Navigation request for partial content using streams
Time to first byte
Use streams and partial content
Footer
…
Service-Worker-Navigation-Preload: true
GET /index.html HTTP/2
Streaming
Best case
SW asleep
Slow
cache
No SW
Cache
miss
Worst case
Streaming
w/ Nav
Preloading
No SW
SW Cache latency Network latency
SW Boot
latency
Offscreen Canvas
Now you can render your
graphics off the main thread
with OffscreenCanvas!
Unblock main thread
const offscreen = document.querySelector('canvas').transferControlToOffscreen();
const worker = new Worker('myworkerurl.js');
worker.postMessage({ canvas: offscreen }, [offscreen]);
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real use cases"
The AV1 Standart
royalty-free more efficient way to
compress videos.
Video codecs
▪ H.264/MPEG-4
▪ Theora/Ogg
▪ VP9/WebM
▪ H.265/MPEG-H HEVC
▪ AV1/WebM
Video codecs
▪ H.264/MPEG-4
▪ Theora/Ogg
▪ VP9/WebM
▪ H.265/MPEG-H HEVC
▪ AV1/WebM
You can try it
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -strict
experimental av1_test.mkv
AV1 by 30% better compression than VP9, and achieves gains of
50.3% compared to H.264
One excuse
AV1 transcoding is about 10 000 times slower
Site Isolation
so each <iframe> (not website) is a
single thread.
More secure way for the Web
Independent process for iframes
NEW FEATURES & APIs
COMING SOON
Virtual Scroller
native out-of-the-box handling for TMI.
<script type="module">
import 'std:virtual-scroller';
const scroller = document.querySelector('virtual-scroller');
scroller.updateElement =
(el, contact, idx) => el.textContent = contact.name;
async function getData() {
const resp = await fetch('contacts.json');
scroller.itemSource = await resp.json();
}
getData();
</script>
<virtual-scroller></virtual-scroller>
<script type="module">
import 'std:virtual-scroller';
const scroller = document.querySelector('virtual-scroller');
scroller.updateElement =
(el, contact, idx) => el.textContent = contact.name;
async function getData() {
const resp = await fetch('contacts.json');
scroller.itemSource = await resp.json();
}
getData();
</script>
<virtual-scroller></virtual-scroller>
<script type="module">
import 'std:virtual-scroller';
const scroller = document.querySelector('virtual-scroller');
scroller.updateElement =
(el, contact, idx) => el.textContent = contact.name;
async function getData() {
const resp = await fetch('contacts.json');
scroller.itemSource = await resp.json();
}
getData();
</script>
<virtual-scroller></virtual-scroller>
<script type="module">
import 'std:virtual-scroller';
const scroller = document.querySelector('virtual-scroller');
...
getData();
</script>
<virtual-scroller>
<template>
<div>content will be here</div>
</template>
</virtual-scroller>
The proof-of-concept
so you can set priority for
each and every JS call.
Task
Scheduling API
Input handlers rAFs Document Lifecycle
(Style, Layout, Paint)
Next Frame
User-blocking tasks Default
tasks
Idle tasks
Task Scheduling Pipeline
~16ms
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real use cases"
CSS Houdini
so you could build your own
CSS rules.
// main.js
CSS.paintWorklet.addModule('my-paint.js');
// main.js
CSS.paintWorklet.addModule('my-paint.js');
// my-paint.js
registerPaint('circle', class {
paint(ctx, geom, properties) {
ctx.fillStyle = 'pink';
ctx.arc(
geom.width / 2, geom.height / 2, // center
Math.min(geom.width, geom.height), // radius
0, 2 * Math.PI // full circle
);
ctx.fill();
}
});
// index.html
<style>
.element {
background-image: paint(circle);
}
</style>
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real use cases"
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real use cases"
CSS Houdini
OFF THE MAIN THREAD
WebAssembly
and Threads
so you can communicate
between threads directly.
Web App
JS Engine
Worker
JS Engine
Create Worker
Worker
JS Engine
Workers don't talk to each other
Web App
JS Engine
Worker
Wasm Module
Worker
Workers don't talk to each other
SharedArrayBuffer
Great coffee
machine
so workers will make you the
cappuccino.
Great coffee
machine
so workers will make you the
cappuccino.
BUT NO :(
USE NOW
DON’T WAIT!
NEW
COMING SOON
#1 SERVICE WORKERS &
SMART CACHING
#2 OFFSCREEN CANVAS
#3 AV1
#4 SITE ISOLATION
#1 VIRTUAL SCROLLER
#2 TASK SCHEDULER
#3 CSS HOUDINI
#4 WEB ASSEMBLY & THREADS
Thank You
Alexey Kupriyanenko, alexeyk@wix.com
Slides bit.ly/fwd-web20
Q&A
Alexey Kupriyanenko, alexeyk@wix.com
Slides bit.ly/fwd-web20
N/A
...but performance is
a real blocker to deal with.
Regular phone High-end phone

More Related Content

PDF
Instant and offline apps with Service Worker
PPTX
Wonderful csom sps barcelona
PDF
Node.js introduction
PDF
Service worker API
PDF
"Service Worker: Let Your Web App Feel Like a Native "
PDF
PWA 與 Service Worker
PDF
Real time event dashboards
PDF
Service workers
Instant and offline apps with Service Worker
Wonderful csom sps barcelona
Node.js introduction
Service worker API
"Service Worker: Let Your Web App Feel Like a Native "
PWA 與 Service Worker
Real time event dashboards
Service workers

What's hot (20)

PDF
Service Worker - Reliability bits
PPTX
Coolblue - Behind the Scenes Continuous Integration & Deployment
PDF
Live Streaming & Server Sent Events
PDF
Into to Node.js: Building Fast, Scaleable Network Applications
PPTX
webworkers
PPTX
Promises, Promises
PDF
How to connect AngularJS to servers
PDF
Avoiding callback hell with promises
PDF
JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
PDF
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
PDF
Deploying Your Favorite Web App To AWS Lambda with Apex up
PDF
API Days Paris - Automatic Testing of (RESTful) API Documentation
PDF
Redux. From twitter hype to production
PDF
Svelte JS introduction
PPTX
Learning Svelte
PDF
JS Chicago Meetup 2/23/16 - Redux & Routes
PDF
Asynchronous JavaScript loading
PDF
JavaScript Web Workers
PDF
Getting started with node JS
KEY
Dancing with websocket
Service Worker - Reliability bits
Coolblue - Behind the Scenes Continuous Integration & Deployment
Live Streaming & Server Sent Events
Into to Node.js: Building Fast, Scaleable Network Applications
webworkers
Promises, Promises
How to connect AngularJS to servers
Avoiding callback hell with promises
JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
Deploying Your Favorite Web App To AWS Lambda with Apex up
API Days Paris - Automatic Testing of (RESTful) API Documentation
Redux. From twitter hype to production
Svelte JS introduction
Learning Svelte
JS Chicago Meetup 2/23/16 - Redux & Routes
Asynchronous JavaScript loading
JavaScript Web Workers
Getting started with node JS
Dancing with websocket
Ad

Similar to Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real use cases" (20)

PDF
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
PDF
Spring Web Services: SOAP vs. REST
PDF
GWT Web Socket and data serialization
KEY
Writing robust Node.js applications
PDF
HTML5: huh, what is it good for?
PDF
Server-Side Push: Comet, Web Sockets come of age (OSCON 2013)
PPT
Svcc2009 Async Ws
PPT
PDF
Experiences on a Design Approach for Interactive Web Applications
PPT
Enhance Web Performance
PDF
Play Framework: async I/O with Java and Scala
PPTX
SharePoint Client Object Model (CSOM)
PDF
Get Ahead with HTML5 on Moible
PPTX
Bare-knuckle web development
PPT
Sanjeev ghai 12
PPTX
Event-driven IO server-side JavaScript environment based on V8 Engine
PDF
[1C1]Service Workers
PPTX
Java web application development
PDF
125 고성능 web view-deview 2013 발표 자료_공유용
PDF
Cape Cod Web Technology Meetup - 2
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
Spring Web Services: SOAP vs. REST
GWT Web Socket and data serialization
Writing robust Node.js applications
HTML5: huh, what is it good for?
Server-Side Push: Comet, Web Sockets come of age (OSCON 2013)
Svcc2009 Async Ws
Experiences on a Design Approach for Interactive Web Applications
Enhance Web Performance
Play Framework: async I/O with Java and Scala
SharePoint Client Object Model (CSOM)
Get Ahead with HTML5 on Moible
Bare-knuckle web development
Sanjeev ghai 12
Event-driven IO server-side JavaScript environment based on V8 Engine
[1C1]Service Workers
Java web application development
125 고성능 web view-deview 2013 발표 자료_공유용
Cape Cod Web Technology Meetup - 2
Ad

More from Fwdays (20)

PDF
"Mastering UI Complexity: State Machines and Reactive Patterns at Grammarly",...
PDF
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
PPTX
"Computer Use Agents: From SFT to Classic RL", Maksym Shamrai
PPTX
"Як ми переписали Сільпо на Angular", Євген Русаков
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
PDF
"Validation and Observability of AI Agents", Oleksandr Denisyuk
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
PPTX
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
PPTX
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
PDF
"AI is already here. What will happen to your team (and your role) tomorrow?"...
PPTX
"Is it worth investing in AI in 2025?", Alexander Sharko
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
PDF
"Database isolation: how we deal with hundreds of direct connections to the d...
PDF
"Scaling in space and time with Temporal", Andriy Lupa .pdf
PPTX
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
PPTX
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
PPTX
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
PPTX
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
"Mastering UI Complexity: State Machines and Reactive Patterns at Grammarly",...
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
"Computer Use Agents: From SFT to Classic RL", Maksym Shamrai
"Як ми переписали Сільпо на Angular", Євген Русаков
"AI Transformation: Directions and Challenges", Pavlo Shaternik
"Validation and Observability of AI Agents", Oleksandr Denisyuk
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
"AI is already here. What will happen to your team (and your role) tomorrow?"...
"Is it worth investing in AI in 2025?", Alexander Sharko
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Database isolation: how we deal with hundreds of direct connections to the d...
"Scaling in space and time with Temporal", Andriy Lupa .pdf
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
A Presentation on Artificial Intelligence
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
cuic standard and advanced reporting.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine Learning_overview_presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Assigned Numbers - 2025 - Bluetooth® Document
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
A Presentation on Artificial Intelligence
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25-Week II
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
cuic standard and advanced reporting.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation

Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real use cases"