State whether True or False. I. Lifetime attribute is used to specify the…
2018
State whether True or False.
I. Lifetime attribute is used to specify the lifetime of a cookie in a browser.
II. Cookies are made secure using the Boolean attribute.
Answer: C. I-False, II-True — ConceptA browser cookie is controlled by standardized attributes in the Set-Cookie response header. Expires and Max-Age determine persistence, while Secure…
- A.
I-True, II-False
- B.
I-True, II-True
- C.
I-False, II-True
- D.
I-False, II-False
Attempted by 50 students.
Show answer & explanation
Correct answer: C
Concept
A browser cookie is controlled by standardized attributes in the Set-Cookie response header. Expires and Max-Age determine persistence, while Secure and HttpOnly are presence-only flags: their presence activates a restriction and their absence leaves it inactive.
Attribute names and attribute forms matter. A descriptive idea such as a cookie’s lifetime is not itself an attribute unless the specification defines that exact name.
Application
Statement I names a Lifetime attribute. The standard persistence attributes are Expires, which gives an absolute date, and Max-Age, which gives a duration in seconds; no Lifetime attribute is defined. Therefore Statement I is false.
Statement II refers to a Boolean attribute for security. Secure is a presence-only flag that restricts the cookie to secure transport, so it behaves as a Boolean attribute. Therefore Statement II is true.
Contrast
I-True, II-False conflicts with both attribute rules: Lifetime is not a defined attribute, whereas Secure is a presence-only flag.
I-True, II-True treats the undefined Lifetime name as valid.
I-False, II-False overlooks the Boolean nature of the Secure flag.
Result
The supported truth-value combination is I-False, II-True.