They finally generally understand the difference:
1, session exist on the server, cookie exists in a text file on the client;
2, session cookie than safety, so you can put some important login information on the session, other information is placed on the cookie myself;
3, cookie storage limit the amount of data, only 4KB, and the session is unlimited;
4, increase access, session may consume server performance, reduced server if you want to consider this cookie;
5, set the cookie time can make the cookie expire. But using session-destory (), to destroy the session.
So much of it, anyway, I understand, as to the future use of words, and then learn in detail -