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
310
Machine Learning Basic and Python
yoheimune
1
530
Python Scraping and Web Apps for G's ACADEMY TOKYO
yoheimune
0
250
DevelopWorkflow and Solving Problems
yoheimune
0
450
Git and Github for Beginners
yoheimune
1
300
Data Science BOOTCAMP Practices - Recommendation
yoheimune
0
220
Data Science BOOTCAMP Practices
yoheimune
0
370
Machine Learning with Python
yoheimune
0
360
Other Decks in Technology
See All in Technology
進化する大規模言語モデル評価: Swallowプロジェクトにおける実践と知見
chokkan
PRO
1
220
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
4
3.8k
어떤 개발자가 되고 싶은가?
arawn
0
170
AIでデータ活用を加速させる取り組み / Leveraging AI to accelerate data utilization
okiyuki99
6
1.4k
だいたい分かった気になる 『SREの知識地図』 / introduction-to-sre-knowledge-map-book
katsuhisa91
PRO
3
1.5k
オブザーバビリティが育むシステム理解と好奇心
maruloop
3
1.7k
CLIPでマルチモーダル画像検索 →とても良い
wm3
1
640
マルチエージェントのチームビルディング_2025-10-25
shinoyamada
0
220
デザインとエンジニアリングの架け橋を目指す OPTiMのデザインシステム「nucleus」の軌跡と広げ方
optim
0
120
dbtとAIエージェントを組み合わせて見えたデータ調査の新しい形
10xinc
7
1.5k
SREのキャリアから経営に近づく - Enterprise Risk Managementを基に -
shonansurvivors
1
450
AI連携の新常識! 話題のMCPをはじめて学ぶ!
makoakiba
0
160
Featured
See All Featured
A designer walks into a library…
pauljervisheath
209
24k
A Modern Web Designer's Workflow
chriscoyier
697
190k
GitHub's CSS Performance
jonrohan
1032
470k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Documentation Writing (for coders)
carmenintech
75
5.1k
Building Applications with DynamoDB
mza
96
6.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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