[JAVA] Easily organize cookies, sessions and caches

cookie

・ The information of "who?" Is acquired and saved.

-It is dangerous for security because there are passwords and user_ids. Therefore, the information is kept more safely in the session.

・ Save location on your PC (mainly browser)

・ Cookies can be disabled.

session

-Obtain and save the information "What did you do?"

・ It is often generated in conjunction with cookies.

-The storage location is not only the browser but also the server, so you can follow it.

-The session cannot be disabled.

cache

-A mechanism for temporarily storing frequently used data in a faster storage device in order to speed up access.

・ Information for speeding up is saved.

Three differences

The big difference between caches and cookies and sessions is Whereas the cache stores information for faster display Cookies and sessions store user information.

Recommended Posts

Easily organize cookies, sessions and caches
How cookies and sessions work
Differences between browser sessions and cookies and Rails session and cookies methods