IT Technology

Difference Between Cache and Cookies

Cache vs Cookies

Summary: Difference Between Cache and Cookies is that Memory cache helps speed the processes of the computer because it stores frequently used instructions and data. While cookie is a small text file that a Web server stores on your computer. Cookie files typically contain data about you, such as your user name or viewing preferences.

Difference Between Cache and Cookies

Cache

Most of today’s computers improve processing times with cache (pronounced cash). Two types of cache are memory cache and disk cache. Memory cache helps speed the processes of the computer because it stores frequently used instructions and data. Most personal computers today have at least two types of memory cache: L1 cache and L2 cache.

L1 Cache

L1 cache is built directly in the processor chip. L1 cache usually has a very small capacity, ranging from 8 KB to 128 KB. L1 and L2 both are levels in cache memory. L1 usually built on processor chip itself. L1 Cache is totally shared between two cores.

L2 Cache

L2 cache is slightly slower than L1 cache but has a much larger capacity, ranging from 64 KB to 16 MB. Current processors include advanced transfer cache, a type of L2 cache built directly on the processor chip. Proces sors that use advanced transfer cache perform at much faster rates than those that do not use it. Personal computers today typically have from 512 KB to 12 MB of advanced transfer cache.

Cache speeds up processing time because it stores frequently used instructions and data. When the processor needs an instruction or data, it searches memory in this order: L1 cache, then L2 cache, then RAM — with a greater delay in processing for each level of memory it must search. If the instruction or data is not found in memory, then it must search a slower speed storage medium such as a hard disk or optical disc.

Cookies

E-commerce and other Web applications often rely on cookies to identify users. A cookie is a small text file that a Web server stores on your computer. Cookie files typically contain data about you, such as your user name or viewing preferences. Many commercial Web sites send a cookie to your browser, and then your computer’s hard disk stores the cookie. The next time you visit the Web site, your browser retrieves the cookie from your hard disk and sends the data in the cookie to the Web site. Web sites use cookies for a variety of purposes:

  • Most Web sites that allow for personalization use cookies to track user preferences. On such sites, users may be asked to fill in a form requesting personal information, such as their name, postal code, or site preferences. A news Web site, for example, might allow users to customize their viewing preferences to display certain stock quotes or local weather forecasts. The Web site stores their preferences in a cookie on the users’ hard disks.
  • Some Web sites use cookies to store users’ passwords, so that they do not need to enter it every time they log in to the Web site.
  • Online shopping sites generally use a session cookie to keep track of items in a user’s shopping cart. This way, users can start an order during one Web session and finish it on another day in another session. Session cookies usually expire after a certain time, such as a week or a month.
  • Some Web sites use cookies to track how often users visit a site and the Web pages they visit while at the site.
  • Web sites may use cookies to target advertisements. These sites store a user’s interests and browsing habits in the cookie.
  • You can set a browser to accept cookies automatically, prompt you if you want to accept a cookie, or disable cookie use altogether. Keep in mind if you disable cookie use, you will not be able to use many of the e-commerce Web sites.

Also Read:

Difference Between L1 and L2 Cache

Difference Between Flash Memory and Cache Memory

Difference Between Cache and RAM

Difference Between Buffer and Cache

Difference Between Cache and Register

Difference Between Unix and Linux

Leave a Comment