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 Communication APIs
Search
Adrian Olaru
September 27, 2011
Programming
3
130
Web Communication APIs
Web Messaging, Web Workers, Server Sent Events, Web Sockets
Adrian Olaru
September 27, 2011
Tweet
Share
Other Decks in Programming
See All in Programming
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
320
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
4
1.9k
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
AI時代のUIはどこへ行く?
yusukebe
16
8.2k
ソフトウェアテスト徹底指南書の紹介
goyoki
1
140
コンテキストエンジニアリング Cursor編
kinopeee
1
760
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
560
TDD 実践ミニトーク
contour_gara
1
290
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
AIエージェント開発、DevOps and LLMOps
ymd65536
1
380
複雑なドメインに挑む.pdf
yukisakai1225
5
990
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
490
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.4k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Music & Morning Musume
bryan
46
6.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
Designing Experiences People Love
moore
142
24k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Gamification - CAS2011
davidbonilla
81
5.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Transcript
Web Communication
[email protected]
None
Connectivity
Web Messaging Web Workers Server Sent Events Web Sockets
The way of the force
Sending complex data
Don’t trust client e.data Always check e.origin
allows documents from different domains to communicate with each other
in a secure way Web Messaging
Browser Support* 5.0+ 3.0+ 8.0 4.0+ 10.1+ * source: http://caniuse.com
None
None
Use Cases portals widgets ads traffic counters
Web Workers run JavaScript in parallel on a web page,
without blocking the user interface
Browser Support* 5.0+ 3.5+ 4.0+ 10.6+ * source: http://caniuse.com
None
None
Notes can’t access parent & it’s DOM ‘this’ == current
worker can use XHR, SSE or WebSocket can importScripts(‘script.js’) can use other workers can use timers (setTimeout, setInterval)
Server Sent Events push data from the server to the
client over HTTP
Browser Support* 6.0+ 4.0 5.0 11 * source: http://caniuse.com
None
None
None
None
None
Use Cases subscribe to live score real time polls bidding
updates for actions stock quotes live news
Web Sockets a bi-directional connection between the server and the
client
Browser Support* 5.0+ 4.0 5.0 11 * source: http://caniuse.com deactivated
by default * * *
None
None
None
Notes full duplex communication removes the overhead (only 2 bytes)
dramatically reduces complexity
Use Cases online chat online games realtime geolocation package tracking
Demos http://github.com/adrianolaru/webcom
None
Danke