Fixed JS to comply with cache protocol