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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.