cookieconsent
cookieconsent copied to clipboard
Cookie expiration ignored and set to 7 days
Hi,
I recenly set up this cookie consent solution but I'm facing an issue where the expiration date gets automatically set up to 7 days from the consent, despite having set the cookie-expiration
param to 365 days.
var cc = initCookieConsent(); cc.run({ current_lang: 'en', //autoclear_cookies: true, //page_scripts: true, force_consent: true, cookie_expiration: 365 });
Has anyone ever encountered a similar issue? Thanks
I think that cookie_expiration sets the cookie expiration date for this consent manager cookie where it saves preferences. Are you sure you're watching the right cookie expiration date? This cannot set cookie expiration date for any other cookie that is not created by cookie consent. I may be wrong since I also just started using this awesome cookie consent manager recently but for me that is working as described.
Hi @acolle,
unless you reproduce the issue in a live demo that I can inspect, I can't help you. There is probably something else in your setup/project that is causing this weird behavior.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.