in WordPress core in 4.1/4.2 (probably Spring 2015) • Available now as a plugin: wp-api.org • There is also a public WordPress.com REST API that you can use with any self-hosted site via Jetpack…
for users • Any JS can run when the user isn't connected to the internet if it's stored in Application Cache • There are a lot of complications around Application Cache • Hopefully in the not too distant future we can use Service Worker instead