Skip to content

Local storage #677

Answered by orestbida
theNomik asked this question in Q&A
Apr 24, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@theNomik Sorry, this is not possible and there is no plan on adding such option.

With that said, you could still handle this case:

// get value of the the plugin's cookie from your storage manager
const ccValue = storageManager....

// if value is not empty, set it in localStorage
if (value) {
   localStorage.setItem('cc_cookie', JSON.stringify(ccValue));
}

CookieConsent.run({...});

You would also need to keep the value updated in your storage manager (update on onAccept and onChange events).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@theNomik
Comment options

Answer selected by theNomik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants