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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Gen
March 24, 2017
Programming
30
0
Share
Optimizing Contents Delivery
Gen
March 24, 2017
More Decks by Gen
See All by Gen
VRT
gen
0
15
Introduction to WebRTC
gen
0
240
Introduction to ECS
gen
0
44
Introduction to multiplayer netcode
gen
0
88
Introduction to WebGL
gen
0
52
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
85
Other Decks in Programming
See All in Programming
AgentCore Optimizationを始めよう!
licux
3
190
AIを導入する前にやるべきこと
negima
2
330
書き換えて学ぶTemporal #fukts
pirosikick
2
350
[RubyKaigi 2026] Require Hooks
palkan
1
290
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
2
260
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
460
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
170
My daily life on Ruby
a_matsuda
3
180
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
120
The Less-Told Story of Socket Timeouts
coe401_
3
950
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.6k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
ラッコキーワード サービス紹介資料
rakko
1
3.2M
Agile that works and the tools we love
rasmusluckow
331
21k
Abbi's Birthday
coloredviolet
2
7.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
510
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
220
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
780
New Earth Scene 8
popppiees
3
2.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
160
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
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