Multiple choice technology security

Which among the below do you think is the right approach for secure session management?

  1. Display “Welcome, user!” on the home page

  2. Display only “Welcome” on the home page

  3. Invalidate and destroy the session when user logs out

  4. Use persistent cookies for session management

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Proper session management requires destroying session data on logout to prevent session hijacking. Invalidating and destroying the session removes all session data from server. Displaying personalized info (A) or generic welcome (B) doesn't address session security. Persistent cookies (D) increase security risk as they remain after browser closes.