Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Optimizing Contents Delivery
Search
Gen
March 24, 2017
Programming
32
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Optimizing Contents Delivery
Gen
March 24, 2017
More Decks by Gen
See All by Gen
VRT
gen
0
17
Introduction to WebRTC
gen
0
250
Introduction to ECS
gen
0
52
Introduction to multiplayer netcode
gen
0
89
Introduction to WebGL
gen
0
58
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
87
Other Decks in Programming
See All in Programming
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
290
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
910
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
120
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.5k
Vite+ Unified Toolchain for the Web
naokihaba
0
330
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
140
dRuby over BLE
makicamel
2
390
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.2k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
130
1B+ /day規模のログを管理する技術
broadleaf
0
110
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
390
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Discover your Explorer Soul
emna__ayadi
2
1.1k
HDC tutorial
michielstock
2
720
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Balancing Empowerment & Direction
lara
6
1.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
600
How to Ace a Technical Interview
jacobian
281
24k
Designing for humans not robots
tammielis
254
26k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Transcript
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