CQ dispatcher - Cookie issue
I have a component where I am creating cookie by using below code:
Cookie cookie = new Cookie("testCookie", "cookieValue");
slingResponse.addCookie(cookie);
My cookie is getting created in browser but at the same time page is getting cached in dispatcher. The problem comes when another user comes to visit the page. Of course he will get the cached page from dispatcher and above cookie won't get created for him.
I have an omniture tracking code written in JS which is dependent on cookie existence.
How do I resolve this issue?