Jump to content

Difference between session and cookies


rinteractive

Recommended Posts

sessions are stored on the server

cookies are stored locally

 

sessions are more secure

cookies are not, as you can get the data if you can get at there PC

 

Essentually you can use either, but sessions are best for practice and better if you want to focus on security

i am new to php , just  i want the difference between  session and cookies can any one explain me.

 

Thanks in Advance :)

 

A session is stored in the browser (so to speak) for that particular website so if you return to it, your details still remain, but they usually expire once the browser has been closed. Cookies on the other hand are small text files that are saved to the user's PC, the main difference being that a cookie can be stored for alot longer; down side being they can easily be manipulated/editted by a user.

 

Sam

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.