My notes from the #html5devconf in San Francisco, CA on Monday, October 15 & Tuesday, October 16 – 2012.
Cache is King
9:00am : Keynote
Steve Souders from Google
- mobile connections are high latency, duh
- last modified & etag
- conditional get requests suffer to latency, it’s still a request
- cache-control/max-age: max seconds before checking
- if you change the file: change the name (a la cdn)
- cache-control: max-age=0, must-revalidate, no-cache – always new file, ALWAYS
- cache deliberately!
- heuristic cacheing: a “freshness lifetime” some fraction (10%), fraction of time since last modified
- bringing it home (w/love): mostly good, but some that demonstrate ambigious caching (by doing nothing)
- oooh app cache:
- if anything is 404’d – nothing is cached
- must update manifest AND resources (right)
- takes two reloads – yes. app cache isn’t the shit it’s cracked to be
- the point of apcache: touch the network as little as possible
- updateReady work around for load twice issue
- stick code in localStorage? WAT?
- browsers will get smarter with local preferred caching. that won’t help us though.
The cache IS in fact king, and while many many things matter payload size, number of requests, execution time, etc – not having to fetch something is faster than having to.
Browserify – Use Node Modules in the Browser
James Halliday from Browserling
- npm is amazing – don’t forget! 16k packages
- “make crazy mad science happen”
- node modules return values, don’t modify context
- require is the other side of the commonjs
- browserify will recursively traverse the entire dependency graph
- can also use node core api –watch and save as you will
- huh: you can require a json file with node and it returns the object back to you.
- jsonSTREAM would allow us to only parse what we want from bloated json responses from the server.
It sounds super awesome to do this. If we could get our backend to node, we might totally do this. Also, James/Substack totally comes across as a super genius; In the good way.
HTML5: Postcards from the Bleeding Edge
Peter Lubbers from Google
- wifi dead – couldn’t note take, but this was more about building websites than games. in fact, most of the new apis and such discussed aren’t supported on mobile yet anyway.
As noted above, this is more relevant to desktop, mobile is out for now.
What You Could Have Built With HTML This Whole Time
Stephen Blum from PubNub
- html has perceived limitation.
- this talk has an actual limitation
Maybe it was an off talk/day or something, but this presentation came across as more about promoting the company than sharing.
Josh Powell from Rocket Fuel
- this talk is packed
- general info about what a SPA is (single page application), perks:
- distributed load, one language, one data format
- cons: back button, search, messy, analytics, sense of errors on client side, approach:
- back: use history api & hash (onhaschange)
- search: use #! & ?_escape_fragment_=key=value
- messy: use patterns “do the work”
- analytics: do the work to GA api
- exceptions: throw errors somewhere (airbrake, bugsense)
It was srsly hot in this upper room. The talk was solid, tech focused, and relevant. It was short though, only 30 minutes. Might be worth buying the book.