use localStorage instead of cookie to store