This document discusses advanced JavaScript techniques for building modern web applications, including: CORS and OAuth2 for API access; local storage for caching access tokens; templates with Mustache.js; WebSockets, ActivityStreams, and PubSubHubbub for real-time updates; and including third-party widgets using containers and gadgets. Live demos are provided of various techniques.