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
Webは今まさに面白い(オフライン編)
Search
Yohei Munesada
November 27, 2014
Technology
0
1.1k
Webは今まさに面白い(オフライン編)
自分がWebについてワクワクしていることを共有したく話したLT資料です。第5回 HTML5 minutes!
https://atnd.org/events/59057
Yohei Munesada
November 27, 2014
Tweet
Share
More Decks by Yohei Munesada
See All by Yohei Munesada
G'sデータベース設計の講義
yoheimune
4
5.3k
How to create a service, How to google !
yoheimune
0
300
Machine Learning Basic and Python
yoheimune
1
510
Python Scraping and Web Apps for G's ACADEMY TOKYO
yoheimune
0
240
DevelopWorkflow and Solving Problems
yoheimune
0
440
Git and Github for Beginners
yoheimune
1
290
Data Science BOOTCAMP Practices - Recommendation
yoheimune
0
210
Data Science BOOTCAMP Practices
yoheimune
0
360
Machine Learning with Python
yoheimune
0
350
Other Decks in Technology
See All in Technology
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
100
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
230
2025/6/21 日本学術会議公開シンポジウム発表資料
keisuke198619
2
480
25分で解説する「最小権限の原則」を実現するための AWS「ポリシー」大全
opelab
9
2.2k
本部長の代わりに提案書レビュー! KDDI営業が毎日使うAIエージェント「A-BOSS」開発秘話
minorun365
PRO
14
2.3k
米国国防総省のDevSecOpsライフサイクルをAWSのセキュリティサービスとOSSで実現
syoshie
2
820
AIエージェントの継続的改善のためオブザーバビリティ
pharma_x_tech
6
1.4k
OAuth/OpenID Connectで実現するMCPのセキュアなアクセス管理
kuralab
5
880
rubygem開発で鍛える設計力
joker1007
1
130
25分で解説する「最小権限の原則」を実現するための AWS「ポリシー」大全 / 20250625-aws-summit-aws-policy
opelab
7
770
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
2
160
ローカルLLMでファインチューニング
knishioka
0
130
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
39
1.9k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
The Language of Interfaces
destraynor
158
25k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Adopting Sorbet at Scale
ufuk
77
9.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Bash Introduction
62gerente
614
210k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Designing for Performance
lara
609
69k
For a Future-Friendly Web
brad_frost
179
9.8k
Transcript
8FCࠓ·͞ʹ໘ന͍ ΦϑϥΠϯฤ फఆ༸ฏ @yoheiMune ג αΠόʔΤʔδΣϯτ
What is the weakness of the Web?
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc
Web Apps are Slow
Web Apps are Slower
Web Apps are Slower than Native Apps
Why is the web slow?
Why is the web slow? Let’s focus on networking
Reason of slow web http://yoheim.net/index.html ͔ΒσʔλΛऔಘ͢Δ߹Λߟ͑Δ
Step1: DNS Lookup DNS Server What is “yoheim.net” ? 182.48.49.53
Progress
Step2: 3-way Handshake 182.48.49.53 (yoheim.net) ଓ͍͍ͯ͠ʁ OK ͡Ό͋ΑΖ͘͠! Progress
Step3: Content Download yoheim.net GET /index.html Download Progress
Step4: Code Execution yoheim.net Progress )5.-ͷղੳͱ࣮ߦ
Reason of slow web DNS Lookup 3-way handshake Content Download
Execution ϑΝΠϧ࣮ߦ͢Δʹͳ͔ͳ͔େมʂʂ
Reason of slow web html css javascript image 4MPX
͠ΦϑϥΠϯػೳΛ͑
Online vs Offline Online Offline ͱͬͯ͘ͳΔͧʂ
Available Offline Functionality ✓ HTML5 App Cacheʢ2008ʙʣ ✓ LocalStorage /
SessionStorageʢ2009ʙʣ ✓ Navigator.onLine ✓ etc
HTML5 App Cache ✓ ϚχϑΣετϑΝΠϧΛॻ͚͑ͯ؆୯ CACHE MANIFEST # Time: Thu
Oct 02 2014 20:10:16 GMT+0900 (JST) CACHE: js/all.js css/all.css NETWORK: * manifest.appcache
HTML5 App Cache But…
Problems of HTML5 App Cache ✓ Ωϟογϡཧ͕ϒϥβͤ ✓ ్தͰΤϥʔ͕ى͖ͨ࣌ʹͲ͏͢Ε͍͍ͷ͔… ✓
indexϑΝΠϧ͕ඞͣΩϟογϡ͞ΕΔ
Service Worker is coming!
About Service Worker ✓ JavaScriptΛ༻͍ͨΩϟογϡίϯτϩʔϧ ✓ ։ൃऀ͕͖Ίࡉ͔ͳΩϟογϡཧ͕Ͱ͖Δ ✓ ϝΠϯεϨουҎ֎Ͱಈ࡞͢Δ
Register - Service Worker navigator .serviceWorker.register('/sw.js', { scope: '/' }).then(function(sw)
{ console.log('ॲཧޭ'); }).catch(function(error) { console.log('ॲཧࣦഊ'); });
Install - Service Worker this.addEventListener('install', function(event) { event.waitUntil( caches.create('v1').then(function(cache) {
return cache.add( '/index.html', '/style.css', '/app.js', '/img/logo.svg' ); }) ); });
Use Cache - Service Worker this .addEventListener('fetch', function(event){ event.respondWith( caches.match(event.request);
); });
Service Worker is difficult, but magic!
Available Offline Functionality ✓ HTML5 App Cacheʢ2008ʙʣ ✓ LocalStorage /
SessionStorageʢ2009ʙʣ ✓ Navigation.onLine ✓ Service Workerʢ2014ʙʣ
And more…
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc ΦϑϥΠϯ +BWB4DSJQUΤϯ δϯͷੑೳ61 8FC(- &$."4DSJQU 8FC $PNQPOFOUT $P⒎FF4DSJQU "VEJP7JEFP .FEJB$BQUVSF 8FC4QFFDI "1*
Weakness of the Web ✓ Slow Speed දࣔը໘ͷସɺϓϩάϥϜͷ࣮ߦͳͲ ✓ JavaScript
Poor Functions MapSetͱ͍ͬͨجຊతͳίϨΫγϣϯαϙʔτ͍ͯ͠ͳ͍ ✓ Restricted functionality ిΧϝϥϚΠΫͳͲ͑ͳ͍ػೳ͕·ͩ·ͩଟ͍ ✓ etc ΦϑϥΠϯ +BWB4DSJQUΤϯ δϯͷੑೳ61 8FC(- &$."4DSJQU 8FC $PNQPOFOUT $P⒎FF4DSJQU "VEJP7JEFP .FEJB$BQUVSF 8FC4QFFDI "1* 8FCࠓ·͞ʹਐԽ͍ͯͯ͠໘ന͍ʂ
ະདྷ࡞Δ͜ͱ͕Ͱ͖Δ ✓ Join to Github / Publish your code Polymer,
jQuery, Angular, … ✓ Join to Mailing List Service Worker, … ✓ Join to User Group HTML5j, Angular, ….
ະདྷ࡞Δ͜ͱ͕Ͱ͖Δ ✓ Join to Github / Publish your code Polymer,
jQuery, Angular, … ✓ Join to Mailing List Service Worker, … ✓ Join to User Group HTML5j, Angular, …. ຊ͔Βٕज़Λਐา͍ͤͨ͞
http://github.com/yoheiMune http://www.yoheim.net http://twitter.com/yoheiMune Thank you