Cache vs. Cookies

Difference Between Cache and Cookies

Cache (browser cache) and cookies are two forms of provisional storage kept on client’s machine to recuperate the performance of web pages. Cookie is a very minute piece of information that is stored on the client’s machine by the web site and is sent back to the server each time a page is requested. Cache is short-term web page storage on machine of client for faster loading of pages.

Cookies

Netscape introduced the idea of cookies in their Netscape Navigator browser. Cookie, a small piece of information that is stored on the client’s machine by the web site, is sent back to the server each time a page is requested. Since cookies are sent back each time, a minimum amount of data must be saved in order to accumulate bandwidth. A web site only reads the cookie written by it, thus providing a secure means of storing information among different pages. In the starting cookies get defamed because of the rumors that says cookies can read all the data which is in the hard drive. Later these rumors were come to an end as people found that cookies are harmless, now they are accepted. Cookies life span is defined by the creators. At the end the cookie expired. Cookies can track information like how frequently the user visits, what are the times of visits, user preferences, which banners is clicked on, etc. Cookies can be used to store information required for shorter periods. If information like email addresses (which must be kept for longer periods) necessitate being stored, the programmer needs to employ a database instead of cookies. Nevertheless, for personal information gets stored in cookies, an encryption is needed to develop security.

Cache

When a user types in the address of a web page or clicks on a hyperlink of a web page on her browser, a request for the corresponding page is sent to the correct web server. Then, web server sends the content of the page and the resources required view the page to the browser. The client’s machine browser will show the page. Conversely if the resources (pictures or images, audio files and video files, etc.) are large files, they will take a considerable time (which depend upon the speed of connection). Due to this loading of will be slow which makes it irritating for user. In order to diminish this delay, and load the web pages quicker, these resources can be stored on client’s machine (after the first time loading of page), so that loads of same page can acquire the fixed resource files from the local computer. This is called browser caching. In other words, cache is temporary web page storage on machine of client for faster loading.

What is the difference between Cache and Cookies?

- While cookies and cache are two ways to store data on client’s machine, they provide diverse purposes. Rationale of cookie is to store information to track unusual characteristics associated to user, while the purpose of cache is to make the loading of web pages faster.

- Cookies maintain information such as user preferences, whilst cache will keep resource files such as audio, video or flash files.

- Naturally, cookies expire after some time, but cache is reserved in the client’s machine until they are detached manually by the user.

 

Category: VS  |  Tags: