What is Cache and Cookies? How it is used?

cache vs cookies

Caches and Cookies are different terms subsequently doing same works for some level in website. Though both are functioning to reduce the time lag and improving user efficiency.

Cache

Cache – Its a type of memory usually stored in computer’s CPU or GPU. However, the main function of cache is to lower the time rate of website loading.

Now-a-days, caches mostly integrated within computer storage. It acts as a primary unit of RAM[Random Access Memory]. If we access any website, it search for web’s info in cache, if it isn’t there then it will go on to RAM.

Cache files usually contains many kinds of file formats for example .html, .CSS, audio, video, image, and xml files too. As a result , it occupies a lot of memory in computer’s storage.

Types of Cache

There are two types of cache. They are
1) Physical cache
2) Software cache

Physical caches usually stored in computer’s physical storage like RAM. The information in this is accessed by computer’s operating system[OS]. Its very efficient comparing to other type of cache.

Software caches are comparatively smaller in small. Its stored in browsers. By clearing this cache in device might helps to speed up the efficiency of device.

When a particular website which we search is found or available are called as cache hits.
If our search website details not found in physical or software cache, then its called as cache miss.

Cookies

Cookies are also kind of memory occupying file which stores the details about website. While fetch the details from user computer, its time efficient and easy for user.

Cookies not only stored in computer but also on server of websites with user’s critical information. Cookies stored in browser mostly. The key features in browsers like autofill, staying on same website are results of cookies.

Types of Cookies

There are three different types of cookies. They are:
1) Session cookies
2) Permanent cookies
3) Third-party cookies

The types of cookies which erased or removed from the browser once the user logout in browser automatically named as session cookies. It decreases the loading time of websites.

Cookies which stays in browser for particular brief span of time usually 2-4 weeks termed as permanent cookies. Its reason for the autofill in the browser.

Third-party cookies comprises of all advertisement related websites details. Its mainly present in e-commerce website which helpful for tracking the user.