I have the following situation: I have a subpage lets call it mypage.com/test1. On this subpage I store some values in a session variable with JS after some ajax calls. However I want to clear this session variable whenever the user leaves this subpage and goes to for example mypage.com or mypage.com/test2. But I do not know how to achieve this.
Does anybody have any idea on how to achieve this? :)