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
Things I've learnt from my Hacker News web app
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Lim Chee Aun
January 22, 2013
Technology
130
1
Share
Things I've learnt from my Hacker News web app
A talk I gave at the Front-end Developers User Group meet up in Hackerspace SG.
Lim Chee Aun
January 22, 2013
More Decks by Lim Chee Aun
See All by Lim Chee Aun
Hacktoberfest SG 2018
cheeaun
0
150
CSS-ing the Super Silly Hackathon website
cheeaun
0
110
Bridging Connections
cheeaun
2
490
Other Decks in Technology
See All in Technology
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
520
iOS・Androidの文字サイズ設定をWebViewに!モバイルUIのアクセシビリティTips
shincarpediem
2
110
AIエージェントの支払い基盤 AgentCore Payments概要
kmiya84377
2
190
CyberAgent YJC Connect
shimaf4979
1
190
おいらのAWSアップデートの追い方〜Slack×AgentCore〜
yakumo
1
110
マンション備え付けのネットワークとLTE回線を組み合わせた ネットワークの安定化の考案
harutiro
1
130
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
410
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
6
590
2026-05-14 要件定義からソース管理まで!IBM Bob基礎ハンズオン
yutanonaka
0
160
"スキルファースト"で作る、AIの自走環境
subroh0508
0
340
AWS WAFの運用を地道に改善し、自社で運用可能にするプラクティス
andpad
1
220
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
1
320
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Un-Boring Meetings
codingconduct
0
290
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
520
How to Ace a Technical Interview
jacobian
281
24k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Accessibility Awareness
sabderemane
1
110
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
How GitHub (no longer) Works
holman
316
150k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
360
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
49
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Transcript
Things I've learnt from my Things I've learnt from my
Hacker News web app Hacker News web app
Hello, I'm Chee Aun. • Hardcore web developer. • Created
quite a bunch of fun little side projects. • Tweet a lot of interesting stuff at @cheeaun • Occasionally read Hacker News.
What is Hacker News?
news.ycombinator.com news.ycombinator.com
I built HackerWeb.
HackerWeb • A simple read-only web app client for Hacker
News. • Mobile-optimized, iOS-optimized. • Works on all modern browsers, hopefully. • Check it out at hackerwebapp.com
None
None
None
Cutting-edge web tech -webkit-overflow-scrolling: touch, localStorage, sessionStorage, CORS, Application Cache,
CSS Animation, CSS Media Queries, Flexible Box Layout (old spec), requestAnimationFrame, Web Workers, and more…
Must-reads • How I built the Hacker News mobile web
app • How I built the Hacker News mobile web app, Part 2 • Introducing HackerWeb
Focus on 3 things 1. -webkit-overflow-scrolling: touch (Momentum scrolling) 2.
CORS (Cross-Origin Resource Sharing) 3. Application Cache
1 Momentum scrolling
-webkit-overflow-scrolling: touch • iOS-specific, for now. No official spec. •
Introduced since iOS5 (October 2011). • For overflow:scroll elements.
Before iOS5 • Two fingers to scroll overflow:scroll elements. •
Unintuitive and undiscoverable. • Scrolling libs to the rescue: iScroll, Scrollability, TouchScroll, FTScroller, etc
Starting from iOS5 • One finger to scroll overflow:scroll elements.
• -webkit-overflow-scrolling: touch adds momentum to it. • Scrolling libs are still in used due to bugs/quirks. • Bug: Can't scroll to top when tapping status bar
Demo time • Normal scrolling: jsbin.com/uhiyac/1 • Momentum scrolling: jsbin.com/uhiyac/2
Resources • Overthrow – overflow:auto polyfill • jQuery Mobile: touchOverflow
• Nested divs with overflow:touch
2 CORS
Before CORS • Use JSONP. • Request data from a
server in a different domain. • Example: json-head.appspot.com/? url=http://www.google.com/&callback=test • A “hack”.
CORS • A W3C Working Draft. • Allow JavaScript to
make cross-domain requests. • An interplay between the server and the client. Access-Control-Allow-Origin: *
Use CORS today!
Who implements CORS? • Google APIs • Amazon S3 •
YouTube API • Dropbox API • GitHub v3 API • …and more
Resources • Enable CORS • CORS isn’t just for XHR
• Can I use CORS? • Using CORS - HTML5 Rocks • CORS Proxy
3 Application Cache
AppCache • Easily make your web site/app offline. • A
working draft. • A douchebag.
Super simple steps Step 1. <html manifest="manifest.appcache"> Step 2. CACHE
MANIFEST index.html stylesheet.css …
Versioning CACHE MANIFEST # 2013-01-21:v1 index.html stylesheet.css …
Google Reader
Reeddit – Reddit web app client
Track AppCache versions Use Google Analytics' event tracking
Make local dev easier • Serve 404 for .appcache files
• For HackerWeb, I use node server.js -noappcache
Resources • A Beginner's Guide to Using the Application Cache
• Fixing Application Cache Community Group • Appcache Facts
More resources • Moobile – new mobile application framework built
on MooTools • Ratchet – Prototype iPhone apps with simple HTML, CSS and JS components • HTML5 Rocks • Can I use…
Thanks • cheeaun.com • twitter.com/cheeaun • github.com/cheeaun Images used in
this presentation • flickr.com/photos/diathesis/2262012694/