COOKIE is an interesting mechanism but as mentioned can be blocked by the browser. This is a feature and nothing can be done to change.
In order to keep browsing data, Sessões
is the alternative. For your better understanding I would say:
COOKIE can be adjusted for a long life time, which means that the data stored in a cookie can be stored for months or even years. Cookies , are stored on the client , work seamlessly and are an important mechanism when you work especially with a cluster web server. >
IMPORTANT: is not supposed to contain vital information and it is good practice for the information contained in it to be digitally signed.
Sessions are stored on the server side, which means that clients do not have access to the information that is stored in them - this is particularly important if you store shopping carts or other information that you do not want your visitors to manually edit as can happen in COOKIES . Session data , being stored on the server side, does not need to be transmitted on each access of each page; you need only one ID per access and the data is loaded from the "local file" .
I mentioned a local file and it was read I always referred to the expression "stored on the server side", but it was intentional, this is because the default PHP mechanism delivers the ability to write session data to files on the server. However it is important to mention that the concept contemplates the possibility of implementing the own mechanism of session management, such as in database. Useful in cluster environment of Web servers.
NOTE: Finally, sessions can be any size you want, because they are kept on your server, while many browsers have a limit on cookies, / p>