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
Gen
March 24, 2017
Programming
40
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
32
Introduction to WebRTC
gen
0
270
Introduction to ECS
gen
0
58
Introduction to multiplayer netcode
gen
0
95
Introduction to WebGL
gen
0
63
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
89
Other Decks in Programming
See All in Programming
スマート反転とウェブアクセシビリティ
camiha
0
210
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
590
Building an Out-of-Order CPU
latte72
1
780
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
110
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
140
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
120
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
330
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
140
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
170
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
52k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The browser strikes back
jonoalderson
0
1.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
Mobile First: as difficult as doing things right
swwweet
225
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.8k
Agile that works and the tools we love
rasmusluckow
331
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Navigating Team Friction
lara
192
16k
Embracing the Ebb and Flow
colly
88
5.2k
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