The COOKIE is an interesting mechanism but as mentioned can be blocked by the browser. This is a feature and can do nothing to change.
In order to maintain navigation data Sessões
is the alternative. For your better understanding would say:
COOKIE can be adjusted for a long life time, which means the data stored in a cookie may be stored for months or even years. Cookies, are stored in the customer, work smoothly and are an important mechanism when you work especially with a cluster of web servers.
IMPORTANT: it is not supposed to contain vital information and it is good practice that the information contained therein is digitally signed.
The sessions are stored on the server side, which means that clients do not have access to the information that is stored on them - this is particularly important if you store shopping carts or other information that you do not want your visitors to manually edit as may happen in COOKIES. The data of the session, being stored on the server side, do not need to be transmitted on each page access; only need an ID for each access and the data is loaded from the "local archive".
I mentioned a local file and if read I always referred to the expression "stored on the server side", but it was intentional because the default PHP engine delivers the ability to save session data to files on the server. However, it is important to mention that the concept contemplates the possibility of implementing its own session management mechanism, such as in a database. Useful in environment of cluster of web servers.
NOTE: Finally, sessions can be of any size you want, because they are kept on your server, while many browsers have a limit for cookies, in addition to being able to block them.
Saving a cookie is optional, take into account security factors that imply this choice. If you could manipulate the setting of cookies that the user made, it would be a terrible browser failure.
– Papa Charlie
but how would I get back to the browser, after I close it, still connected on the system? since not every browser accepts localstorage even less ie (I think)
– flourigh