Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
where should I store user preferences or uers settings - localStorage or cookies?

I know this would vary depending on specific use cases but I want to know what the standard practices are. Let's say we have a darkmode option on our website and users can toggle it. And this change should be preserved. then I guess

  1. if we require the users to log in and the changes should persist between different devices then we should use cookies to send the user settings and store it somewhere in the backend?
  2. if we do not require the user to log in and we just want it to persist on this particular device then we can just store it in the localStorage? Are there any good articles or blog posts I can read on this topic? Also if we are using SSR and we decide to store it in localStorage. Does that mean the user might first see a wrong theme and then once the HTML gets rehydrated they can see the correct theme?
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!