Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda