Ask Question
13 November, 06:17

Var cookie = "username=mike2009";

cookie + = "; max-age=" + 365 * 24 * 60 * 60;

cookie + = "; path=/";

document. cookie = cookie;

(Refer to code example 15-1.) This code

creates a cookie that's removed when the user closes the browser

creates a cookie that's stored for 1 year

creates a cookie that's stored for 365 minutes

does not create a cookie

+5
Answers (1)
  1. 13 November, 08:04
    0
    creates a cookie that stored for 1 year.

    Explanation:

    The code snippet creates a cookie with name mike2009. max-age is used to delete the cookie max-age takes the time in seconds so 365*24*60*60 is equal to 1 year. max-age attribute will delete the cookie after 1 year. In this code max-age is used but expires is used most often because it is supported by all of the browsers max-age is not supported by internet explorer,
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Var cookie = "username=mike2009"; cookie + = "; max-age=" + 365 * 24 * 60 * 60; cookie + = "; path=/"; document. cookie = cookie; (Refer to ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers