updated js clear page on refresh