Client side caching for javascript, css, images and html files via javascript - using file system, indexed database, web sql database or local storage, including a wrapper for application cache