Hi...
when i call AddProductToCompareList method  up to 2 or more time by calling ajax 2 or more time ,it could not store all product id into cookie.
sometimes it stores one value ,sometimes two its unpredictable.
when i debug code, it takes null cookie every time in fucntion GetComparedProductIds which is in compare product services  and add only last product id which is passed by AddProductToCompareList .

I'm very confuse about it.coz when i add only alert message before ajax call.it works fine  and stores all product id's in cookie that i passed through ajax.

What could be the reason behind this?

Thank You.