Problem: The cookie is not being recognized properly. Sometime, it is and at other times, it is not. This results in the pop-up opening randomly many number of times. My guess is the expiry time is not being set properly.
Thanks, but that is what I essentially meant by reading / writing from / to the cookie before I show the pop-up.
And I have checked out the expiry time. It is set properly. And the problem is kind-of narrowed; When I read the cookie, I do not always get the latest value that I stored. It gives me value(s) that I stored at earlier tries. Any solutions for this behavior?