It seems Chrome
can not store cookies with domain localhost
. So while developing a website you can't store cookies!
I've found out this problem via another SO question:
This problem is also addressed at here which caused some developers to leave chrome and migrate to Firefox!