Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7666211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:46:36+00:00 2026-05-31T14:46:36+00:00

I realize this might not be a best fit for SO, so please tell

  • 0

I realize this might not be a best fit for SO, so please tell me where I should move/post this if that is the case.

My idea is after a user signs into the system, store the user preferences on the client in the form of cookies. If a user modifies said preferences, update the cookies. I need to do this because some of the preferences are client related and will need to be looked at via JavaScript.

I realize I’ll need the preferences stored on the server as well. Just wanting to know if pulling them down into cookies is a good idea. My app is primarily ajax driven so I’d like to pull the preferences down once and just store them. I don’t want to push them with each server request.

I’d like to avoid things like Local Storage so that I don’t have to worry about browsers as much. Cookies seem to be supported heavily by all browsers.

Anyone concur or have a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:46:37+00:00Added an answer on May 31, 2026 at 2:46 pm

    Generally cookies are a good idea, provided that you don’t have to store a lot of data. Just few things to keep in mind when using cookies to store stuff:

    • user can edit the preferences by hand so make sure you don’t have things like is_root=false without additional server side checks.

    • this can be annoying when user removes cookies and preferences are gone, I would go for a server side preferences storage mirrored to cookies so JavaScript can use them.

    Other possibility would be to serve dynamic JavaScript, with inlined preferences, instead of static files – you could serve JavaScript the same as you serve dynamic HTML, but then you have to be careful with caching.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize this might not be the best setup, but humor me, is it
I realize that this is a question that will probably not have a single
I realize that this might be a duplicate question but this question is very
I realize that this might be a vague question the bequests a vague answer,
I realize this might not be an efficient select, but it works for now...mostly.
I realize this might be a confusing question so I will try and explain
After posting this question and reading that one I realized that it is very
I realize this code might be a bit dense to read, what I´ve tried
I realise this might be hard to explain, so let me start by using
I realize this is syntactically bad but I figure it somewhat explains what I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.