Answer the question
In order to leave comments, you need to log in
How to remember the choice of the region on the site?
I have a site on which I want to implement the selection of the desired region.
As I imagine it:
When a person visits the site for the first time, we show a pop-up window with the text: Select your region. Now there are two regions Odessa and Kyiv. We have Odessa at moysite.com, and Kyiv at moysite.com/kiev
How can I show the page that the person has chosen on re-entry and not show a pop-up window every time? For example, if he chose Kyiv, then what would redirect him to the page moysite.com/kiev when he enters the main page
Answer the question
In order to leave comments, you need to log in
animation: A-StepsLC 3s ease-in-out;
change to animation: A-StepsLC 10s ease-in-out;
When a person enters the site, check if a cookie (or an element in localstorage) exists and if it contains a valid region name, if yes - redirect the user to the desired page, no - show a window in which you ask him to select a region and write the name of this region to the cookie (or an element in localstorage) and also redirect to the page with the desired region.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question