in Education by
Which attribute is used to extend the lifetime of a cookie? (a) higher-age (b) increase-age (c) max-age (d) lifetime I got this question in unit test. My doubt is from Cookies topic in section Document Object Model and Event Handling in Javascript of JavaScript Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Right choice is (c) max-age Explanation: If you want a cookie to last beyond a single browsing session, you must tell the browser how long (in seconds) you would like it to retain the cookie by specifying a max-age attribute. A number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately.

Related questions

0 votes
    Which of the following is a boolean cookie attribute? (a) bool (b) secure (c) lookup (d) domain ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    When a class B can extend another class A, we say that? (a) A is the superclass and B is the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following defines the Cookie visibility? (a) domain Path (b) local & session storage (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    The Cookie manipulation is done using which property? (a) cookie (b) cookies (c) manipulate (d) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    What is the maximum size of cookie? (a) 4 KB (b) 4 MB (c) 4 bytes (d) 40 KB This ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    How can you set a Cookie visibility scope to localStorage? (a) / (b) % (c) * (d) // I ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which attribute is used to specify initialization method? (a) init (b) init-method (c) initialization (d ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which attribute is used to specify destroy method? (a) destroy (b) destroy-method (c) destruction (d ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which is the attribute used to enable the Client-side image map? (a) map (b) area (c) usemap (d ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
...