Asset manager and downloader for HTML5 apps