Multiple choice technology security

Which cookie flag, when set, will prevent their transmission over non secure channel?

  1. Secure

  2. Domain

  3. Expires

  4. Static

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

To answer this question, the user needs to have knowledge about cookie flags and their purposes.

The Secure flag is used to ensure that cookies are only transmitted over an encrypted (HTTPS) connection. So, it is the flag that will prevent cookies from being transmitted over a non-secure channel.

Option A: Secure is correct.

Option B: Domain is used to specify the domain name to which the cookie should be sent. This flag is not related to preventing transmission over non-secure channels.

Option C: Expires is used to set an expiration time for the cookie. This flag is not related to preventing transmission over non-secure channels.

Option D: Static is not a valid cookie flag.

Therefore, the answer is:

The Answer is: A. Secure.

AI explanation

The 'Secure' cookie attribute, when set, instructs the browser to only transmit that cookie over HTTPS (encrypted) connections, never over plain HTTP. This prevents the cookie (which often carries session identifiers) from being sent in cleartext over an insecure channel where it could be intercepted (e.g., on a public Wi-Fi network via packet sniffing). 'Domain' merely scopes which hosts/subdomains the cookie is sent to — it has nothing to do with transport security. 'Expires' controls the cookie's lifetime/persistence, not the channel it travels over. 'Static' isn't a real standard cookie attribute at all. Secure (often paired with HttpOnly and SameSite) is a core web security control specifically for this purpose.