Php Objective Questions with Answers for written test exams 12

Question 12
When an expiration date is given in a Set-Cookie header, what is the resulting

behavior in subsequent requests?

A. If the expiration date has expired, the cookie is not included.

B. The behavior is the same; the expiration date is included in the Cookie

header, and you can access this information in the $_COOKIE superglobal

array.

C. The cookie persists in memory until the browser is closed.

D. The cookie is deleted and therefore not included in subsequent requests.
Answers 12


Answer A is correct. Answer B is incorrect because only the name and value of the

cookie are included in the Cookie header. Answer C is incorrect because setting

an expiration date causes a cookie to either be deleted (if the date has expired) or

written to disk. Answer D is incorrect because the cookie is only deleted if the

date has expired, which isn’t necessarily the case.

  







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---