Skip to content

autoClear cookies for services #549

Answered by orestbida
dombyte asked this question in Q&A
Discussion options

You must be logged in to vote

The autoclear and page reload options only work with categories.

If you need to remove a cookie set by a service, you will need to manually invoke .eraseCookies() inside the onReject callback, e.g:

{
    onReject: () => {
        im.rejectService('youtube');
        CookieConsent.eraseCookies('im_youtube');
    }
}

Keep in mind that iframemanager already erases its own cookies when a service is rejected, so you shouldn't need to use .eraseCookies(). Also, since we're dealing with iframes, once they are removed, any script/tracking enabled via that iframe should immediately stop, so you shouldn't need to reload the page.

autoclear_cookies

As of v3, this option has been renamed to autoCle…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by dombyte
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