Answer the question
In order to leave comments, you need to log in
Why is the jquery cookie not being saved?
$(document).ready(function(){
$.cookie('do_order', 'yes', { expires: 7}); console.log($.cookie('do_order'));
window.location.href = "/";
});
Answer the question
In order to leave comments, you need to log in
Most likely, you are using the library incorrectly.
Use mine: https://github.com/TTATPuOT/vanilla-js-cookies - it's pure JS and doesn't require jQuery.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question