browser-id browserID() function always gives you the same ID for the same browser. You can use it as a key to store user preferences on server side. const id = browserID();