Cookie permission for every session

Hello, I want the cookie permission to show at every visit. Now if someone answers with “Yes” the cookie is stored and cookie permission doesn’t show anymore. If I want it to keep showing with every new visit, how can I adjust this? So in fact, I want the cookie to last one session. I guess I need to change something in cookie-bar.js: function setCookie(key, value) { var expires = new Date(); expires.setTime(expires.getTime() + (1 * 24 * 60 * 60 * 1000)); document.cookie = key + ‘=’ + value + ‘;expires=’ + expires.toUTCString() + ‘;path=/’; } Can someone help me with this? Thanks, Jeroen

Funny. I experience the effect you wish to have and would like so very much to get rid of it. W’ever: Look here. In a nutshell - Delete the expiration-time part and you have a non persistant cookie, which will be gone with the browser session. Some browsers, however, offer to “continue session”. Then the cookies are back too and no questionss will be asked. For this you could first check IF there’s a cookie, set its expiration date to a timne in the past and with the next page load your question is back. Znak.

1 „Gefällt mir“