Launching Drycomponents - Get Free HTML/React Components built using TailwindCSS

Session persisting issue on Safari for cross domain

While working on my office project with MERN stack, I stumbled upon a issue where my sessions from react app isn't persisting with my express backend app. And this happened only on safari browser and not on other browsers. The reason behind this is, safari by default disables session handling for cross domains. That is, assume your frontend app is running on and your backend is being served from, then safari would not persist the sessions. Inorder to disable this feature, do the following.

Safari > Preference > Privacy > uncheck the "Prevent cross-site tracking".


After performing the above action, your sessions will work like all other browsers.

Happy Coding!

Would like to hear more from me?

Consider Signing up. No spam ever.