CMSPreferredCulture

Theodoulos Iacovou asked on January 30, 2020 09:07

CMSPreferredCulture : Can we change the Expires/Max age from 1 year to Sessions? If yes ,any instructions ?

Correct Answer

Dat Nguyen answered on January 30, 2020 11:49

Changing CMSPreferredCulture to expire at the end of a session may have undesirable effects to user experience especially in a multilingual site, so be mindful of that.

The way I'd expire the cookie is to handle the ApplicationEvents.SessionEnd.Execute event in a custom module class and set the CMSPreferredCulture cookie to a past date. This should cause the cookie to delete when the client session ends.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.