Difference Between Session and Cookies :

Cookie:-

Cookies are client-side files on a local computer that hold user information.

Cookies close on the lifetime set by the user.

It can only store a defined amount of info.

The browser’s cookies have a maximum capacity of 4 KB.

we don’t need to run a function to start cookies.

Session:-

Sessions are server-side files that contain user data.

When the user quits the browser or logs out of the program, the session is over.

It can hold an indefinite quantity of data.

The browser’s session has a maximum capacity of 128 KB.

we must use the session start() method.