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
Things I've learnt from my Hacker News web app
Search
Lim Chee Aun
January 22, 2013
Technology
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
160
CSS-ing the Super Silly Hackathon website
cheeaun
0
120
Bridging Connections
cheeaun
2
510
Other Decks in Technology
See All in Technology
人間はどの意思決定を手放せるのか
kawasima
15
7.9k
AIに賢く動いてもらうためのコンテキスト〜Snowflake女子会 vol.8
snowwmn0824
0
150
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
7
3.5k
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
1.1k
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
330
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
250
Antigravity SDK for the Java Developer
glaforge
0
170
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
2.3k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
3
580
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
880
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
190
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
10
4.9k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
The Language of Interfaces
destraynor
162
27k
It's Worth the Effort
3n
188
29k
The untapped power of vector embeddings
frankvandijk
2
1.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
How STYLIGHT went responsive
nonsquared
100
6.3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
For a Future-Friendly Web
brad_frost
183
10k
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/