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
Lim Chee Aun
January 22, 2013
Technology
130
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
150
CSS-ing the Super Silly Hackathon website
cheeaun
0
110
Bridging Connections
cheeaun
2
490
Other Decks in Technology
See All in Technology
Mastering Ruby Box
tagomoris
3
150
「嘘をつくテスト」の失敗例から学ぶ 良いテストコード #frontend_phpcon_do
asumikam
0
460
そのPoC、何を検証したつもりでしたか? AIプロダクトの価値検証で陥った落とし穴
techtekt
PRO
0
150
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
1
750
探して_入れて_作って_使う_Agent_Skills___LT.pdf
peintangos
2
160
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
180
AI Testing Talks: Challenges of Applying AI in Software Testing: From Hype to Practical Use
exactpro
PRO
1
130
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
720
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.5k
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
260
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.3k
Optimizing for Happiness
mojombo
378
71k
How to make the Groovebox
asonas
2
2.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Abbi's Birthday
coloredviolet
2
7.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
HDC tutorial
michielstock
2
690
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
140
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/