Not the yummy kind.

HTTP Cookies

If you’ve been on the internet, you’ve heard about cookies. Most recently, websites are creating popups and banners announcing the fact that they do collect your cookies and for you to ‘accept’ this fact. But why should you accept it? Why should you potentially not accept it?

Going back to the earlier days of the Internet, cookies were the solution to an age-old problem: How do we create a seamless experience for our user in the simplest way possible?

State

Let’s talk about state for a moment, shall we? In our regular lives, state can be referred to as the actual condition we are presently experiencing. Hungry, tired, or angry can all be states that we’ve experienced. They’re not permanent (hopefully) and we can update those states and change them to full, rested and happy through certain actions. Same with our websites and operating systems!

Most websites use cookies to track user authentication. If you’ve signed in to Twitter, the website wants to remember that state of being signed-in and vice-versa. These particular cookies would be encrypted. This is one example of how cookies can be helpful to us, the user.

Incognito mode

When opening Chrome in incognito mode, we’re not hiding everything we do, but we are preventing cookies from being sent or stored. The result of this - no browser history! So as you can see, cookies can be used - and are used - to track your history on the Internet.

Companies can compile these histories and use them, or sell them, to create targeted advertising.

Besides incognito mode, browsers usually have settings options to disable third-party cookies and plug-ins to block advertisements. Although, these methods won’t stop all cookies from being collected.

As we all know, most everything on the web that is good can also be used for evil. Always stay aware, and code responsibly.

Happy coding!

E


Got Questions❓, Comments 🗣 or Edits ✍

Use the Twitter thread below and hashtag #E4Everything to get in touch with me regarding this blog post:

Previous: HTTP RequestsNext: Getting Started with C++