Saturday, July 19, 2014

What is Difference between Session and Cookies ?

The basic and main difference between cookie and session is that cookies are stored in the user's browser but sessions can't store in user's browser. This specifies which is best used for. 

• A cookie can keep all the information in the client's browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie. 

• Sessions are not reliant on the user allowing a cookie. They work like a token in the browser which allowing access and passing information while the user has opened his browser. The problem in sessions is when you close the browser the session will automatically lost. So, if you had a site requiring a login, this couldn't be saved as a session but it can be saved as a cookie, and the user has to re-login every time they visit.
cookies are nothing but a small piece of information on the client machine. before we create a cookies we should check whether the cookies are allowed at the browser side. They are limited in a size 4k.(they are 2 types of cookies peristant cookie , and session cookies) 

Sessions cookies are stored in a server memory during the client browser session.When the browser is closed the session cookies are lost.

Related Posts:

  • Deploying a Web Service Deploying the .Net Web Services is as simple as any ASP.NET application. Similar to ASP.NET applications, you need to copy or upload the .ASMX file and the .DISCO files to the appropriate directories, and that's it.  … Read More
  • Explain the protocols a .Net Web Service uses. In .Net, a web service is bind with three different protocols such as HTTP/POST,  HTTP/GET, and SOAP. This allows client with three options to choose for  communication. The protocols are included in the WSD… Read More
  • Define the specifications that help in the discovery of a web service. DISCO DISCO, an abbreviation of discovery, is a file that groups together a list of related web services. A company that offers web services publishes a DISCO file on its server that has links of all the web services it pr… Read More
  • Testing and consuming a .Net web service. Testing a Web Service .NET has a test web page that ASP.NET uses automatically when you request the URL of an .asmx file in a browser. This page uses reflection to read and show information about the web services, such as … Read More
  • Remoting.Net vs Web Services Both .Net Web services and .Net Remoting are Microsoft solutions for distributed application. Before choosing one of them for application development, let’s identify the differences between these technologies. Protocol .Ne… Read More

0 comments:

Post a Comment