Try to use cookie to recover the data after refresh