V
V
Valery Gutin2018-05-18 02:53:19
JavaScript
Valery Gutin, 2018-05-18 02:53:19

Why are cookies not saved?

I've been struggling with this problem for three days now. I installed a jquery plugin for cookies, I set cookies:

$.cookie('learn1', msg, { expires: 30});
$.cookie('q1', thistime, { expires: 30});
$.cookie('coutQ', 1, { expires: 30});

After restarting the browser (tested in 3, it worked fine only in opera) - one cookie disappears. Is it possible because of OpenServer'a?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
ljutaev, 2018-05-18
@ljutaev

Cookies.set('name', 'value', { expires: 7, path: '' });
try to specify the path, you can just leave it empty, I also had this, after setting the cookies, try to display them with an alert somehow
I did this and checked it: https://codepen.io/ljutaev/pen/GdOpaz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question