added event listener on Location change event to detect page loads but error in retriving cache