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

  1. Secure

  2. Domain

  3. Expires

  4. Static


Correct Option: A
Explanation:

To solve this question, the user needs to know the purpose of cookie flags and how they are used to control cookie behavior.

A. Secure: This option is correct. When the "Secure" flag is set for a cookie, it instructs the browser to only send the cookie over a secure (HTTPS) connection. This prevents the cookie from being transmitted over an insecure (HTTP) channel where it could potentially be intercepted by an attacker.

B. Domain: This option is incorrect. The "Domain" flag is used to specify the domain(s) to which the cookie should be sent. It does not affect whether or not the cookie is transmitted over a secure channel.

C. Expires: This option is incorrect. The "Expires" flag is used to set an expiration date/time for the cookie. It does not affect whether or not the cookie is transmitted over a secure channel.

D. Static: This option is incorrect. There is no "Static" flag for cookies.

Therefore, the answer is: A. Secure

Find more quizzes: