Cookies, Cookie Monster, and Actual Cookies

Beth Jaswa
gSchool Stories

--

As this post has continued to develop in my head, I thought back to when Android’s KitKat was released. I came into work that morning and a few guys in the office asked me “Can we get some KitKats?!”. It was such an odd and specific request that I’m pretty sure I gave them the titled head of confusion. Then they began to explain that today KitKat was released and the prior version was Jelly Bean and they historically keep with candy names. I’m sure I replied with something like “I’ll look to see if one of our vendors carries it” but still a bit confused. Then I opened my laptop for the morning and there it is. An email announcing the release of KitKat and how I need to get some KitKats into the snack areas asap to celebrate. At the time, I thought that it was a bizarre correlation and why would you name your software that but sure I can acquire some KitKats.

Today I definitely have a different perspective. Since you get to choose the name for your variables, software, ect.. why not name it something fun and engaging? This brings me to class last week when I was listening to how cookies work and of course my brain gets stuck on cookies. Yum. Cookies. I should make some. Soon. What kind? Chewy. Definitely with chocolate chips. I know! I should make those Cowboy cookies I love. Since I was so inspired to bake and only partially listened to the lecture, I figured I could reward myself with tasty warm cookies if I investigate cookies some more on my own time.

So what is a cookie anyway?

A cookie is a small plain text file that is stored on your browser’s directory on your computer. Think of a cookie’s contents is like an ingredient list for how you use that particular website.

Ingredients

  • “remember me” remember your registered login
  • theme selections
  • recently looked at items or pages (think Amazon’s recommended products)
  • preferences
  • any information you have voluntarily given like your email address
  • ID tag so the website can recognize your cookie

Cookies are super important to websites with logins, large databases, and provide lots of customization for their users. Cookies contain the url of the website that created them, the duration of the cookie’s abilities and effects, and a random number (your ID tag).

We’ve got two kinds of cookies:

  1. Session cookies are temporary and get deleted when you leave the site. Enter a bakery and smell freshly baked warm cookies. Once you leave and walk outside (hopefully after consuming a cookie!), the smell of cookies is gone, much like a session cookie.
  2. Persistent cookies stay in your browser’s subfolder and start up again when you revisit the site. These bad boys have a set duration period on the file as well so they can’t linger forever. A persistent cookie is like if you worked at the bakery. You enter bakery at 6am. Then you mix up some dough and begin to bake. After 8 hours of baking cookies, you walk outside and you still smell like cookies. Awesome. You go home and take a shower 1 hour after you get off and now you don’t smell like cookies. Your set duration period is 9 hours (let’s assume the bakery always smells like cookies).

Try this:

  1. Open up your browser (I’m using Chrome) and go to your favorite sites.
  2. Inspect element on the page (right click-Inspect Element).
  3. Click on the “Resources” tab, then choose “Cookies”.
  4. Click on the site name and check out your cookies!

I find the “Expires/Max-Age” column is particularly interesting. Did you see any session cookies? What’s the furthest out expiration date? Some of them hang out on your computer for years… or even decades!

When you’ve got lurking cookies, seek out the Cookie Monster!

Photo by Richie Rich

When dreaming up this post, I imagined that something would already be available to eat your cookies for you and probably named Cookie Monster! Why? Because that sounds like fun!

In my search, I found this Cookie Monster to manage your cookies and this Cookie Monster to eat all your cookies from the current domain in one click. As awesome as I wanted these to be, they’re not really. The first Cookie Monster even states that unless you have some specific problem, most browsers already allow you to manage your cookies pretty well. So you could just manage your cookies yourself (in Chrome).

Why even manage or delete cookies?

  • You’ve got privacy concerns.
  • Something gets broken because of an old stale cookie. It might be time for a new start and fresh cookie.
  • Maybe you don’t want to return to the site where you left off for some reason and want to return to the site as a new user.

And Finally, Actual Cookies!

All this talk about cookies has my mouth watering for a real cookie. I love these cookies because they have pretty much everything I want in a cookie: chewy, chocolate, optional nuts, and oatmeal. Let me introduce you to Cowboy Cookies!

My recipe is an adaptation on a recipe similar to this one. One year for Christmas we decided to gift cookies in a jar and loved the layers and simplicity of a recipe like this one. So we made a bunch of these and I wrote out the instruction cards. Then I thought, you know maybe I should make these first before I give all my friends and family a recipe I’ve never used before. I wouldn’t want to give them a horrible recipe.

I dumped all my dry ingredients in my bowl and stirred. Then added my wet ingredients and stirred. Easy peasy. Except the batter was incredibly dry. I don’t know about you, but I am of The Chewy faction of cookie lovers. Crispy, crunchy cookies aren’t even worth consumption to me. So shoot… I need to add some moisture. What do I add? Unsweetened applesauce. And of course I didn’t measure it. And of course these cookies turned out wonderfully. For next year, I tried to mimic the first batch of these cookies and this recipe is the closest I’ve come.

Cowboy Cookies — my adaptation

  1. Preheat oven to 350 degrees
  2. Mix everything in one bowl (easy clean up!)
  3. Grease cookie sheets or use parchment paper (it is AMAZING and more easy clean up!)
  4. Bake for 10 minutes — longer if desired. For deliciously chewy cookies, pull them out a little before they look done. Trust that they will finish off on the pan and even on the wire rack.
  5. Cool on pan slightly before moving them to a wire rack.

This makes 24 kinda large cookies.

Enjoy!

--

--

Beth Jaswa
gSchool Stories

Engineering Leader. Enjoys Tasty Food and Beverages. Wishes Upon a Star (Disney Fanatic).