Which of the following should be stored in the cookie?
-
Session ID
-
Account Privileges
-
UserName
-
Password
A
Correct answer
Explanation
Only the Session ID should be stored in a cookie - it's an opaque reference to server-side session data. Storing privileges, username, or especially passwords in cookies exposes sensitive information to theft (XSS, sniffing, physical access) and violates the principle of storing only identifiers, not authoritative data, on the client.