We have a site where users choose a location (a city) and we set a cookie (we're using the Super Cookie addon), then we deliver content based on that cookie.

This “choose your location” is set up on it’s own page, and once selected it directs the user to the landing page of that location. THEN we want the logo and a few other links in the main nav, to use that cookie value. So, let’s say they chose “Denver” - the cookie would be “denver” and then we would use that value in certain URL segments in the nav - /about/{exp:super_cookies:get name=‘my_chosen_location’} = /about/denver

But the issue I’m having, is when they go to change to a different location, it doesn’t update the cookie right away. It takes the user to the chosen location landing page (as expected), but the nav links with /{exp:super_cookies:get name=‘my_chosen_location’} will still have the previously chosen location value.

How can I get the cookie to update right away without having to do another page reload?

Your Answer

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

Browse other questions tagged or ask your own question.