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

What's hot (20)

PDF
Service Worker - Reliability bits
jungkees
 
PPTX
Coolblue - Behind the Scenes Continuous Integration & Deployment
Matthew Hodgkins
 
PDF
Live Streaming & Server Sent Events
tkramar
 
PDF
Into to Node.js: Building Fast, Scaleable Network Applications
Flatiron School
 
PPTX
webworkers
Asanka Indrajith
 
PPTX
Promises, Promises
Domenic Denicola
 
PDF
How to connect AngularJS to servers
Carlos Morales
 
PDF
Avoiding callback hell with promises
TorontoNodeJS
 
PDF
JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
Mukul Jain
 
PDF
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
PROIDEA
 
PDF
Deploying Your Favorite Web App To AWS Lambda with Apex up
Riza Fahmi
 
PDF
API Days Paris - Automatic Testing of (RESTful) API Documentation
Rouven Weßling
 
PDF
Redux. From twitter hype to production
FDConf
 
PDF
Svelte JS introduction
Mikhail Kuznetcov
 
PPTX
Learning Svelte
Christoffer Noring
 
PDF
JS Chicago Meetup 2/23/16 - Redux & Routes
Nick Dreckshage
 
PDF
Asynchronous JavaScript loading
yay w00t
 
PDF
JavaScript Web Workers
Tobias Pfeiffer
 
PDF
Getting started with node JS
Hamdi Hmidi
 
KEY
Dancing with websocket
Damien Krotkine
 
Service Worker - Reliability bits
jungkees
 
Coolblue - Behind the Scenes Continuous Integration & Deployment
Matthew Hodgkins
 
Live Streaming & Server Sent Events
tkramar
 
Into to Node.js: Building Fast, Scaleable Network Applications
Flatiron School
 
webworkers
Asanka Indrajith
 
Promises, Promises
Domenic Denicola
 
How to connect AngularJS to servers
Carlos Morales
 
Avoiding callback hell with promises
TorontoNodeJS
 
JSChannel 2017 - Service Workers and the Role they Play in modern day web-apps
Mukul Jain
 
4Developers 2018: Let's get (a bit) more offline (Paweł Łukaszuk)
PROIDEA
 
Deploying Your Favorite Web App To AWS Lambda with Apex up
Riza Fahmi
 
API Days Paris - Automatic Testing of (RESTful) API Documentation
Rouven Weßling
 
Redux. From twitter hype to production
FDConf
 
Svelte JS introduction
Mikhail Kuznetcov
 
Learning Svelte
Christoffer Noring
 
JS Chicago Meetup 2/23/16 - Redux & Routes
Nick Dreckshage
 
Asynchronous JavaScript loading
yay w00t
 
JavaScript Web Workers
Tobias Pfeiffer
 
Getting started with node JS
Hamdi Hmidi
 
Dancing with websocket
Damien Krotkine
 

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

PDF
More efficient, usable web
Chris Mills
 
PDF
Ten practical ways to improve front-end performance
Andrew Rota
 
PDF
Using React for the Mobile Web
C4Media
 
PDF
Progressive Web Apps. What, why and how
Riza Fahmi
 
PDF
"Progressive Web Apps" by Riza Fahmi (Hacktiv8)
Tech in Asia ID
 
PDF
Introduction to Performance APIs
Shogo Sensui
 
PDF
JavaScript Service Worker Design Patterns for Better User Experience
reeder29
 
PDF
A year with progressive web apps! #DevConMU
Antonio Peric-Mazar
 
PDF
Fast Cordova applications
Ivano Malavolta
 
KEY
Developing High Performance Web Apps - CodeMash 2011
Timothy Fisher
 
PDF
Front-end. Global domination
Stfalcon Meetups
 
PDF
Frontend. Global domination.
Андрей Вандакуров
 
PDF
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
Ontico
 
PDF
Of innovation and impatience - Future Decoded 2015
Christian Heilmann
 
PDF
Even faster web sites 1st Edition Steve Souders
huapepotts09
 
PDF
APIs for modern web apps
Chris Mills
 
PDF
Service workers are your best friends
Antonio Peric-Mazar
 
PDF
The Open Web and what it means
Robert Nyman
 
KEY
Optimization of modern web applications
Eugene Lazutkin
 
PPT
Velocity EU 2012 - Third party scripts and you
Patrick Meenan
 
More efficient, usable web
Chris Mills
 
Ten practical ways to improve front-end performance
Andrew Rota
 
Using React for the Mobile Web
C4Media
 
Progressive Web Apps. What, why and how
Riza Fahmi
 
"Progressive Web Apps" by Riza Fahmi (Hacktiv8)
Tech in Asia ID
 
Introduction to Performance APIs
Shogo Sensui
 
JavaScript Service Worker Design Patterns for Better User Experience
reeder29
 
A year with progressive web apps! #DevConMU
Antonio Peric-Mazar
 
Fast Cordova applications
Ivano Malavolta
 
Developing High Performance Web Apps - CodeMash 2011
Timothy Fisher
 
Front-end. Global domination
Stfalcon Meetups
 
Frontend. Global domination.
Андрей Вандакуров
 
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
Ontico
 
Of innovation and impatience - Future Decoded 2015
Christian Heilmann
 
Even faster web sites 1st Edition Steve Souders
huapepotts09
 
APIs for modern web apps
Chris Mills
 
Service workers are your best friends
Antonio Peric-Mazar
 
The Open Web and what it means
Robert Nyman
 
Optimization of modern web applications
Eugene Lazutkin
 
Velocity EU 2012 - Third party scripts and you
Patrick Meenan
 
Ad

More from Fwdays (20)

PPTX
"Як ми переписали Сільпо на Angular", Євген Русаков
Fwdays
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
"Validation and Observability of AI Agents", Oleksandr Denisyuk
Fwdays
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
Fwdays
 
PPTX
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
Fwdays
 
PDF
"AI is already here. What will happen to your team (and your role) tomorrow?"...
Fwdays
 
PPTX
"Is it worth investing in AI in 2025?", Alexander Sharko
Fwdays
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
PDF
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa .pdf
Fwdays
 
PPTX
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
Fwdays
 
PPTX
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
Fwdays
 
PPTX
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
PPTX
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Fwdays
 
PPTX
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
PPTX
"Confidential AI: zero trust concept", Hennadiy Karpov
Fwdays
 
PPTX
"Choosing Tensor Accelerators for Specific Tasks: Compute vs Memory Bound Mod...
Fwdays
 
"Як ми переписали Сільпо на Angular", Євген Русаков
Fwdays
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Validation and Observability of AI Agents", Oleksandr Denisyuk
Fwdays
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
Fwdays
 
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
Fwdays
 
"AI is already here. What will happen to your team (and your role) tomorrow?"...
Fwdays
 
"Is it worth investing in AI in 2025?", Alexander Sharko
Fwdays
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
"Scaling in space and time with Temporal", Andriy Lupa .pdf
Fwdays
 
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
Fwdays
 
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
Fwdays
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Fwdays
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
"Confidential AI: zero trust concept", Hennadiy Karpov
Fwdays
 
"Choosing Tensor Accelerators for Specific Tasks: Compute vs Memory Bound Mod...
Fwdays
 
Ad

Recently uploaded (20)

PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
July Patch Tuesday
Ivanti
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 

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