Why don't the cookies?

Put a jquery plugin for the cookie, using a separate page set cookies using the usual js
document.cookie = "name=<?=$name?>";

then on page reassign that cookie lived longer (I know that it is possible through js to do, but to me it's easier)

$.cookie('name', $.cookie('name'), { expires: 1});

everything seems to work, even worth the time, but after restarting the browser the cookies down.

5afc788ba4ca0630903165.png

UPD:

Just zatestit, there is only the first cookie (at the end of the session), ignores the rest. Here is recorded and redirected to the main page:

document.cookie = "name=<?=$name?>; path=/; expires=" + date.toUTCString();
 document.cookie = "fname=<?=$fname?>; path=/; expires=" + date.toUTCString();
 document.cookie = "avatar=<?=$ava?>; path=/; expires=" + date.toUTCString();
June 5th 19 at 21:37

Find more questions by tags HTTP CookiesJavaScript