1

What I am trying to do is give the users/visitors the option to alter the whole website based on their taste. So they can move for example the sticky bar from top to bottom, alter background colors, news box from left to right etc.

For users I will probably store all the information in the DB but I am not sure how I should handle this afterward. Should I store all the settings into a cookie instead of grabbing that info from the DB all the time and "rebuilding" the website based on their taste or do you have any other idea?

  • You don't need to say 'thank you' on a question (MSE). Also, you've got two significant questions in this post, could you narrow it down to just one question in a post (MSE)? – user40980 Jun 14 '14 at 13:38
  • I am not sure how I should handle this situation to be honest. How I should code it and I am open to suggestions. So I'll remove the CSS question. Thanks! – user3465843 Jun 14 '14 at 13:42
1

Instead of using cookies, it would be smarter to use sessions: There is now only one cookie set, which would be some unique identifier of the user.And then indeed grab all the important user information from the database.

You can of course store this information in session variables afterwards, and only reload them if they are not set, or a user changed their preferences.

  • Ah yeah I forgot to say either cookies or session but I wasn't sure if session would be good enough :) Thanks! – user3465843 Jun 14 '14 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.