User settings based on cookie?

Hello,

I let the users change the website settings(webbrowser based settings). Thing is that every single time a webbrowser with saved settings visits my website, a db connection/request is being done. I dont think this would work if the website gain alot of users. Do you have any solution for me?

This is how it work:

  • I have a standard setting which does not require any DB request.
  • If the user choose to change the settings, the browser of the user get an token inside a cookie. The setting-data is saved to a json-object which get saved in my DB. So is also the token.
  • Every single time this webbrowser visits my website(and every single time index. is refreshed), I check for the token-cookie.If it exist, then I connect/make a request to my db to get the settings

a normal forum like this easily do 10-30 queries for every new request

ok then it wont be a problem. thank you

At least (like all other premature optimization issues) it isn’t a problem - until it is. When (if) it starts to look like a problem you can look into it, until then I’d suggest focusing on more important things to get the app done.

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service