What is the difference between Cookie, Cache and Session?

Awadh Jamal (Ajakai)
By -
0
People confused to differentiate Cookie, Cache and Session. Before we go and clear out the difference between Cache and Cookies, first let’s have a look what are ‘Caches’ and ‘Cookies’

What are Cookies?

A cookie is small piece of information stored on your computer by a website you visit. Every time the user loads the website, the browser sends the cookie back to the server to notify the website of the user’s previous activity. Cookies have a certain life span defined by their creators. At the end of this, a cookie becomes expired. Cookies often track information like how frequently the user visits, what are the times of visits, what banners have been clicked on, what button clicked, user preferences, items in shopping cart, etc. This allows the site to present you with information customized to fit your needs. Cookies are usually used to store information needed for shorter periods.
Cookies was first introduced by Netscape and in those earlier stages cookies did not receive good acceptance, since rumours said it might hack your personal data. Later people realized that cookies are actually harmless, and now they are highly accepted.

What are Caches?

A web cache (or HTTP cache) is an information technology for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag. A web cache system stores copies of documents passing through it; subsequent requests may be satisfied from the cache if certain conditions are met. A web cache system can refer either to an appliance, or to a software. For example, when you open some websites with large pictures and video’s, it might take a considerable amount of time for the website to load. The web browser stores the site contents like the images, videos, audio etc. on your computer so the next time you load the same website you will find it loading faster.

Now let’s see the difference between Cache and Cookies

Although cookies and cache are two ways to store data on client’s machine, but there are difference between cache and cookies and they serve different purposes.
• Cookie is used to store information to track different characteristics related to user, while cache is used to make the loading of web pages faster.
• Cookies stores information such as user preferences, while cache will keep resource files such as audio, video or flash files.
• Typically, cookies expire after some time, but cache is kept in the client’s machine until they are removed manually by the user.




-------------------------------------------

Cookie : For the most part a cookie will contain a string of text that contains information about the browser. To work, a cookie does not need to know know where you are from, it only needs to remember your browser. Some web sites do use cookies to store more personal information about you.
Internet Cookies are small pieces of information in text format that are downloaded to your computer when you visit many web sites. The cookie may come from the web site itself or from the providers of advertising banners or other graphics that make up a web page.

Cache :
It's a folder full of web pages in the user's computer that is maintained by the web browser for a period of time. In the local, cached page has not been updated from the web, it is retrieved immediately by the browser, saving download time.

Session : It refers to a limited time of communication between two systems. Some sessions involve a client and server, while other sessions involve two personal computers.




Post a Comment

0Comments

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Accept !