+254725682556 +254725052660 [email protected]
Client Area

General Knowledge

What Is a Browser Cookie and Why Do Websites Use Them?

A cookie is a small text file a website stores in your visitor's browser. It doesn't run code or install anything. It just holds a piece of information, like a shopping cart ID or a login session, so the site can recognize the same visitor the next time they load a page.

What a cookie actually contains

A cookie is usually just a name and a value, plus a few rules: which domain it belongs to, how long it should last, and whether it should only be sent over a secure (HTTPS) connection. It can't read your visitor's files or see what's on their computer. It only stores whatever small piece of data your website (or a script running on it, like Google Analytics) chose to put there.

Why your website uses cookies

  • Keeping visitors logged in. Without a cookie, a visitor would have to re-enter their password on every single page.
  • Remembering a shopping cart. An online store uses a cookie to remember what a visitor added before they check out.
  • Analytics and traffic reports. Tools like Google Analytics use cookies to tell returning visitors apart from new ones.
  • Remembering preferences. Language choice, currency, or a dismissed pop-up are often stored this way.

Session cookies vs persistent cookies

A session cookie is temporary. It disappears the moment the visitor closes their browser, which is why you get logged out of some sites automatically. A persistent cookie is set to last for a specific period, from a day to several years, so the site remembers the visitor on their next visit too.

First-party vs third-party cookies

A first-party cookie is set by the website the visitor is actually on, for example to remember their cart. A third-party cookie is set by a different domain embedded on that page, most commonly an ad network or a tracking script. Third-party cookies are the ones usually behind cross-site tracking concerns, and most modern browsers now block or restrict them by default.

Cookies aren't inherently a security risk. The real privacy question is what data a cookie holds and who it's shared with, not whether the site uses cookies at all.

Does your website need a cookie notice?

If your website uses analytics, ad tracking, or anything beyond the cookies strictly needed to make the site function (like keeping a visitor logged in or their cart intact), it's good practice, and in many jurisdictions a legal requirement, to tell visitors about it and let them choose. This applies whether your customers are mostly local or international, since visitors from outside Kenya may be covered by rules like the EU's cookie consent requirements regardless of where your business is based.

If you haven't set this up yet, see how to add a privacy policy and cookie consent notice to your website for the practical steps.