GWAPT · Question #140
What are common uses of cookies in web applications? (Choose two)
The correct answer is A. To store user preferences C. To maintain user sessions. Cookies are small pieces of data stored by a browser that allow web servers to persist information across requests. Storing user preferences (A) is a classic cookie use - things like language, theme, or font size are saved so they persist between visits. Maintaining user…
Question
What are common uses of cookies in web applications? (Choose two)
Options
- ATo store user preferences
- BTo enforce strict password policies
- CTo maintain user sessions
- DTo encrypt all HTTP traffic
How the community answered
(46 responses)- A72% (33)
- B11% (5)
- D17% (8)
Explanation
Cookies are small pieces of data stored by a browser that allow web servers to persist information across requests. Storing user preferences (A) is a classic cookie use - things like language, theme, or font size are saved so they persist between visits. Maintaining user sessions (C) is arguably the most critical cookie use: a session token stored in a cookie lets the server recognize an authenticated user across multiple requests without requiring re-login on every page.
B is wrong because password policies are enforced server-side through validation logic, not cookies. D is wrong because HTTPS/TLS handles traffic encryption at the transport layer - cookies have no role in encrypting HTTP traffic.
Memory tip: Think of cookies as a browser's "sticky note" - they remember who you are (session) and how you like things (preferences). Encryption and security policies live on the server, not in a sticky note.
Community Discussion
No community discussion yet for this question.