Answer the question
In order to leave comments, you need to log in
How to store user site settings?
You need to save JavaScript variables with site design settings. For example, if the user switched the site to night mode and changed the site background to dark, then you need to save these settings after reloading the page. I thought to save JavaScript variables in browser cookies and read and apply this data with JavaScript when loading the page, and if it is not there, then install it. But when saving cookies in the browser, the next time the page is loaded, these cookies fly to the server, which can load it pointlessly. Is there a way to store variables completely locally in the browser without server involvement?
Answer the question
In order to leave comments, you need to log in
Is there a way to store variables completely locally in the browser without server involvement?Yes - LocalStorage
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question