you can use cookies It's an in built method in base javascript You can go online and see how to use it