Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Optimizing Contents Delivery
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Gen
March 24, 2017
Programming
42
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Optimizing Contents Delivery
Gen
March 24, 2017
Transcript
24 slides
Optimizing Contents Delivery Gen Ichino<@zenoplex>
໔ࣄ߲ (͍͍Θ͚λΠϜ) • FP, FRP ͷ͠·ͤΜ • Rx ͷ͠·ͤΜ •
τʔΫεΫϦϓτ࿅श͍ͯ͠ͳ͍Ͱ͢ • 2018 ʹ͋ͨΓલʹͳΔ͔͠Εͳ͍
“Mobile First” FTW http://gs.statcounter.com/press/mobile-and-tablet-internet-usage-exceeds- desktop-for- fi rst-time-worldwide
Code splitting
Why?
bundle.js
bundle.js vendor.js
Long-term caching • มߋ͕΄ͱΜͲೖΒͳ͍Ϟδϡʔϧ܈ • bundle໊ʹhashΛ͏ • max-age: 31536000 (RFC
2616) • CDN
vendor.js Home Settings User menu button Login
How?
es6 Dynamic Import // sync import React from 'react'; //
sync import { Component } from 'react'; // async const AsyncModulePromise = import('../some_modules');
import() • babel-plugin: syntax-dynamic-import • Stage 3 • Webpack 2
• (path: string) => Promise<*> • Support dynamic module name
DEMO https://syntax-dynamic-import-sample.herokuapp.com/
Webpack
React
React Components • Functions • Classes • Promises
DEMO https://syntax-dynamic-import-react-sa.herokuapp.com/
Where?
Where to code split • Route level • High Order
Components
DEMO https://syntax-dynamic-import-react-sa.herokuapp.com/about
Overhead • Heroku still only supports HTTP/1.1 • Overuse can
lead to less user experience
Is JavaScript mobile friendly?
Responsive Component • Mobile First JavaScript • Always render Mobile
Components • Lazy load Desktop Components when and only if necessary
Thx
More Decks by Gen
See All by Gen
VRT
gen
0
41
Introduction to WebRTC
gen
0
270
Introduction to ECS
gen
0
62
Introduction to multiplayer netcode
gen
0
99
Introduction to WebGL
gen
0
67
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
91
Other Decks in Programming
See All in Programming
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
630
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
250
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
470
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
980
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
340
The Cost of the DOM
ypresto
2
210
SODA - FACT BOOK(EN)
sodainc
1
280
はじめてのPLATEAU
nokonoko1203
1
670
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
Debian JP Projectのサーバー構成
uwabami
1
180
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
500
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
590
RailsConf 2023
tenderlove
30
1.6k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.5k
How STYLIGHT went responsive
nonsquared
100
6.4k
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
150
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
830
Bash Introduction
62gerente
615
220k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Faster Mobile Websites
deanohume
310
32k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k