Forum discussion on PHP

Answer the question and discuss

Answer the question and discuss

by Md Assaduzzaman -
Number of replies: 27

1. What do you mean by sessions and Cookies?

2. Which one is secure?

In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Abdul Hadi Hemal -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

2.
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Imran Hossan -
  1. A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. Whenever a session is created, a cookie containing the unique session id is stored on the user's computer and returned with every request to the server.
  2. Sessions are more secure than cookies, since they're normally protected by some kind of server-side security. This does not make them infallible, however.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md. Sarowal -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

2.
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Golam Rabbani -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

2.
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Khandoker Shamimul Haque -
Answer 1:
Cookies and Sessions are used to store information. Cookies are only stored on the client-side machine, while sessions get stored on the client as well as a server.

Answer 2:

Session is more secure because sessions are being stored in server while Cookies are only stored on the browser.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md. Monirul Islam -
Answer 01: Cookies and Sessions:
Cookies and Sessions both are used to store information. Cookies are only stored on the client side machine and on the other hand sessions get stored on the client side as well as a server. Cookies and sessions both are created to identify you when you visit a new website. The only difference is that, cookies are saved in browser and local storage on the other hand sessions are saved on the server


Answer 02. Sessions are more secure than cookies. Because sessions get stored on server and cookies get saved on browser. server hacking is more difficult than browser.
So that's why sessions is secure than cookies
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Mehedi Hasan -
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.


Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
Permalink
Show parent
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Ahsan Habib -
answer(01):
Cookies and Sessions both are used to store information. Cookies are only stored on the client-side machine and on the other hand sessions get stored on the client-side as well as a server. Cookies and sessions both are created to identify you when you visit a new website. The only difference is that cookies are saved in the browser and local storage on the other hand sessions are saved on the server


answer(02):
Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Sohana Tasmim -
ANSWER TO THE QUESTION NO:01
Session: is the term used to refer to a visitor's time browsing a website. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
Cookies: are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

ANSWER TO THE QUESTION NO:02
Comparing both of them, sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. As we know server hacking is more difficult than browser.That's why sessions are more secure than cookies.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md.Iftakher Alam -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.
2.

Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Nozrof Shahriar -
Answer 1---->>>>> Cookies and Sessions are used to store information. Cookies are only stored on the client-side machine, while sessions get stored on the client as well as a server. Session. A session creates a file in a temporary directory on the server where registered session variables and their values are stored.

Answer 2------>>>>>Sessions are more secure than cookies,Because session is safer for storing user data because it can not be modified by the end-user and can only be set on the server-side. Cookies on the other hand can be hijacked because they are just stored on the browser.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Jannatul Marjan -
01:
Cookies and Sessions both are used to store information. Cookies are only stored on the client-side machine and on the other hand sessions get stored on the client-side as well as a server. Cookies and sessions both are created to identify you when you visit a new website. The only difference is that cookies are saved in the browser and local storage on the other hand sessions are saved on the server


02. Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by A. B. M. Mohiuddin -

Answer to the Question no-1

“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

Answer to the Question no-2

Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Shahin Hossen -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.
2.

Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Rifat Rahman -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

2.
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Anaminni Akbar Rupa -
1- Session: is the term used to refer to a visitor's time browsing a website. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
Cookies: are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.
2- Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Tamanna Rahman Himi -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

2.
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Rakibul Hasan -
1:
Cookies and Sessions both are used to store information. Cookies are only stored on the client-side machine and on the other hand sessions get stored on the client-side as well as a server. Cookies and sessions both are created to identify you when you visit a new website. The only difference is that cookies are saved in the browser and local storage on the other hand sessions are saved on the server


2:
Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Raihan Islam Sonet_181-15-1983 -

Session: A session creates a file in a temporary directory on the server where registered session variables and their values are stored. 

Cookies: Cookies are text files stored on the client computer and they are kept of use tracking purpose. Server script sends a set of cookies to the browser. For example name, age, or identification number etc. The browser stores this information on a local machine for future use.

Which one is secure?

Ans: Sessions are more secure than cookies, since they're normally protected by some kind of server-side security. You can generally rest assured that your information will be safe on the server side.


In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Md Hasibul Hassan -
1:
Cookies and Sessions both are used to store information. Cookies are only stored on the client-side machine and on the other hand sessions get stored on the client-side as well as a server. Cookies and sessions both are created to identify you when you visit a new website. The only difference is that cookies are saved in the browser and local storage on the other hand sessions are saved on the server


2:
Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Rasel Hossain -
1. Each session is assigned a unique id which is used to retrieve stored values. Whenever a session is created, a cookie containing the unique session id is stored on the user's computer and returned with every request to the server.
2.Sessions are more secure than cookies. Because sessions get stored on server and cookies get saved on browser. server hacking is more difficult than browser.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Sharmila zaman -
A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. In comparison, a cookie is a small file that the web server stores on the client computer. Once a cookie has been set, all page requests that follow return the cookie name and value.
The session is more secure as it stores on the server-side. A cookie informs the server what your session ID is. Stored data in the cookie is not secure.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Shahariar hasan Shadhin -

  1. A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. Whenever a session is created, a cookie containing the unique session id is stored on the user's computer and returned with every request to the server.
  2. Sessions are more secure than cookies, since they're normally protected by some kind of server-side security. This does not make them infallible, however.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Tanjir rahman -
answer(01):
Cookies and Sessions both are used to store information. Cookies are only stored on the client-side machine and on the other hand sessions get stored on the client-side as well as a server. Cookies and sessions both are created to identify you when you visit a new website. The only difference is that cookies are saved in the browser and local storage on the other hand sessions are saved on the server


answer(02):
Sessions are more secure than cookies. Because sessions get stored on the server and cookies get saved on the browser. server hacking is more difficult than browser.
So that's why sessions are secure than cookies
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Anisuzzaman Shayak 181-15-1988 -
1.
“Session” is the term used to refer to a visitor's time browsing a web site. It's meant to represent the time between a visitor's first arrival at a page on the site and the time they stop using the site.
"Cookies" are text files with small pieces of data like a username and password that are used to identify your computer as you use a computer network. Specific cookies known as HTTP cookies are used to identify specific users and improve your web browsing experience.

2.
Actually, technically cookies are more secure than sessions are. Since sessions are based on cookies they can only be as secure as cookies are, and almost always less secure than that.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Rashaduzzaman Ananda 181-15-1870 -
Cookies and Sessions are used to store information. Cookies are only stored on the client-side machine, while sessions get stored on the client as well as a server.

Session:
A session creates a file in a temporary directory on the server where registered session variables and their values are stored. This data will be available to all pages on the site during that visit.

A session ends when the user closes the browser or after leaving the site, the server will terminate the session after a predetermined period of time, commonly 30 minutes duration.

Cookies:
Cookies are text files stored on the client computer and they are kept of use tracking purpose. Server script sends a set of cookies to the browser. For example name, age, or identification number etc. The browser stores this information on a local machine for future use.

When next time browser sends any request to web server then it sends those cookies information to the server and server uses that information to identify the user.

Sessions are more secured compared to cookies, as they save data in encrypted form.
In reply to Md Assaduzzaman

Re: Answer the question and discuss

by Ahsan Faruque -
A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. Whenever a session is created, a cookie containing the unique session id is stored on the user's computer and returned with every request to the server.
Sessions are more secure than cookies, since they're normally protected by some kind of server-side security. This does not make them infallible, however.