Skip to main content

Override Memberstack to use cookies instead of local storage

Josh Lopez
Josh Lopez
  • Updated

By default, Memberstack uses the browser's local storage to allow members to refresh the page and still be logged in. In the past we used cookies but some browsers do not allow cookies (Safari) without having to click on some browser settings so we decided to use local storage instead. Only use this cookie override if it is absolutely necessary for your app or website.  

If you are using the Memberstack Webflow Package and would like to override Memberstack to use cookies instead of local storage you will need to add data-memberstack-use-cookies to the install script like:

<script data-memberstack-app="APP_ID_HERE" data-memberstack-use-cookies src="https://static.memberstack.com/scripts/v2/memberstack.js" type="text/javascript"></script>

If you are using the Memberstack DOM Package and would like to override Memberstack to use cookies instead of local storage you will need to add useCookies: true to the install script like:

const memberstackInit = memberstackDom.init({
	publicKey,
	appId,
	useCookies: true
})

Was this article helpful?

Didn’t find your answer?

Get an instant answer from Rey, or reach a human. Either way, we’re happy to help.

Comments

No comments yet. Start the conversation below.

Please sign in to leave a comment.

Sitemap