Client Side Caching with javascript