How to set cookie value in one page and read it from another
How to set cookie value in one page and read it from another page web page using jQuery
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 14, 2015, 10:45 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 14, 2015, 10:31 PM EDT
$.cookie("example", "foo"); // Sample 1
$.cookie("example", "foo", { expires: 7 }); // Sample 2
$.cookie("example", "foo", { path: '/admin', expires: 7 }); // Sample 3
Get a cookie
alert( $.cookie("example") );
Delete the cookie
$.removeCookie("example");
Yatendra SharmaRank #710 · 3.3K reputationPosted Sep 14, 2015, 10:36 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 14, 2015, 10:40 PM EDT
Yatendra SharmaRank #710 · 3.3K reputationPosted Sep 14, 2015, 10:43 PM EDT