There are two types of cookies – session cookies and persistent cookies. The main difference between them is that session cookies are temporary. In other words, they disappear as soon as the user closes their browser. So, when they open a new window, the same user will be treated as a new visitor.
Persistent cookies have a longer lifetime. They remain in a browser until the period elapses or somebody has to manually delete them. That means that websites will remember their users, even after they close browsers. In e-commerce, persistent cookies help saving shopping carts, so shoppers could retain their products between the sessions.