client side caching via javascript