adding appcache functionality to enable hosted app to work offline