Introduction to PWAs & New JS Frameworks for Mobile
Sep. 15, 2017•0 likes•21,657 views
Download to read offline
Report
Marketing
Emily Grossman's talk about PWAs from BrightonSEO September 2017
Video slides have been replaced by a screenshot with links to the videos or their original sources.
7. #BrightonSEO @goutaste
PWAs = Death to the Dino
(Someone else made this illustra:on, and I photographed it. Now I cannot remember who. SORRY.)
8. #BrightonSEO @goutaste
Why Do People Like PWAs?
Mobile sales increased by 18% YoY
43% increase in sessions/ user
100% increase in session dura:on 80% improvement in load :me
30% higher Conversion Rate than
na:ve app in Tier 3 ci:es
20% of PWA bookings are from
users who’d uninstalled na:ve app
Homepage loads completely in .8
seconds
Customer acquisi:on cost is 10X less Shoppers spend 20% more ?me
than on previous mobile site
40% lower bounce rate than on
previous mobile site
hEps://www.pwastats.com/
30. #BrightonSEO @goutaste
1. Speed & Performance
Set UpYour Service Worker to
Cache Essential Assets
document.querySelector('.cache-article').addEventListener('click', function(event) {
event.preventDefault();
var id = this.dataset.articleId;
caches.open('mysite-article-' + id).then(function(cache) {
fetch('/get-article-urls?id=' + id).then(function(response) {
// /get-article-urls returns a JSON-encoded array of
// resource URLs that a given article depends on
return response.json();
}).then(function(urls) {
cache.addAll(urls);
});
});
});
On user interaction…
(ex.“save for offline” button)
hEp://bit.ly/sw-caching
32. #BrightonSEO @goutaste
1. Speed & Performance
Optimize for Fast First Paint
Pre-load is like saying, “Hey, browser! Here’s a resource you’re going to need later on, so start loading it now.”
• Pre-load can specify the download “as” =
• "script",
• "style",
• "image",
• "media",
• "document”
bit.ly/what-is-rel-preload
HTTP/2 + Preload = Moves the ‘start download’ time of a critical asset closer to initial request
35. #BrightonSEO @goutaste
One of the
Issues With
Server-Side
Rendering is
The Trade-
Off With
Time to
Interactive
Simulated Slow Network hEps://youtu.be/6Ljq-Jn-EgU
VIDEO: hEps://youtu.be/6Ljq-Jn-EgU
43. #BrightonSEO @goutaste
1. Speed & Performance
“React As Soon As User Indicates Intent”
Cut Down on Click Latency
Experiment by Eli Fitch: Track your reac7on 7me on ‘mousedown’ vs. ‘click ’ hNp://bit.ly/eli-fitch-fluent
let startTime;
$('.button--onclick').on('mousedown', startTimer);
$('.button--onclick').on('click', endTimer);
function startTimer() {
startTime = Date.now();
}
function endTimer() {
const nowish = Date.now();
const timey = nowish - startTime;
$('.readout').html(`Mousedown fired <span class="bold">${timey}ms</span> before click
event`);
}