📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which attribute of an HTTP cookie ensures that the

      cookie is only sent over an HTTPS connection?
      A Secure Correct Answer Incorrect Answer
      B HttpOnly Correct Answer Incorrect Answer
      C SameSite Correct Answer Incorrect Answer
      D Domain Correct Answer Incorrect Answer
      E Path Correct Answer Incorrect Answer

      Solution

      The Secure attribute in an HTTP cookie ensures that the cookie is only sent over secure, encrypted HTTPS connections, preventing its transmission over unencrypted HTTP channels. This provides a layer of protection against attackers trying to capture cookies through man-in-the-middle attacks. Option B (HttpOnly) is incorrect because it restricts access to the cookie from JavaScript, preventing XSS attacks, but it doesn't enforce HTTPS. Option C (SameSite) is incorrect because it controls whether a cookie is sent with cross-site requests, not whether it is transmitted over HTTPS. Option D (Domain) is incorrect because it specifies the domain the cookie belongs to and has nothing to do with security. Option E (Path) is incorrect because it defines the URL path where the cookie is valid, unrelated to HTTPS transmission.

      Practice Next
      More Algorithms Questions

      Relevant for Exams:

      ask-question