In the United States and Canada, a cookie is a small, flat-baked treat, usually round, containing milk, flour, eggs, and sugar, etc. In most English-speaking countries outside North America, the most common word for this is biscuit; in many regions both terms are used, while in others the two words have different meanings—a cookie is a plain bun in Scotland, while in the United States a biscuit is a kind of quick bread similar to a scone.
Cookies are most commonly baked until crisp or just long enough that they remain soft, but some kinds of cookies are not baked at all. Cookies are made in a wide variety of styles, using an array of ingredients including sugars, spices, chocolate, butter, peanut butter, nuts or dried fruits. The softness of the cookie may depend on how long it is baked.
A general theory of cookies may be formulated this way. Despite its descent from cakes and other sweetened breads, the cookie in almost all its forms has abandoned water as a medium for cohesion. Water in cakes serves to make the base (in the case of cakes called "batter) as thin as possible, which allows the bubbles – responsible for a cake's fluffiness – to form better. In the cookie, the agent of cohesion has become some form of oil. Oils, whether they be in the form of butter, egg yolks, vegetable oils or lard are much more viscous than water and evaporate freely at a much higher temperature than water. Thus a cake made with butter or eggs instead of water is far denser after removal from the oven.
Oils in baked cakes do not behave as soda in the finished result. Rather than evaporating and thickening the mixture, they remain, saturating the bubbles of escaped gases from what little water there might have been in the eggs, if added, and the carbon dioxide released by heating the baking powder. This saturation produces the most texturally attractive feature of the cookie, and indeed all fried foods: crispness saturated with a moisture (namely oil) that does not sink into it.
Cookies appear to have their origins in 7th century AD Persia, shortly after the use of sugar became relatively common in the region They spread to Europe through the Muslim conquest of Spain. By the 14th century, they were common in all levels of society, throughout Europe, from royal cuisine to street vendors.
With global travel becoming widespread at that time, cookies made a natural travel companion, a modernized equivalent of the travel cakes used throughout history. One of the most popular early cookies, which travelled especially well and became known on every continent by similar names, was the jumble, a relatively hard cookie made largely from nuts, sweetener, and water.
Cookies came to America in the very first century of English settlement (the 1600s), although the name "koekje" arrived slightly later, with the Dutch. This became Anglicized to "cookie". Among the popular early American cookies were the macaroon, gingerbread cookies, and of course jumbles of various types.
Cookies are broadly classified according to how they are formed, including at least these categories:
A basic biscuit (cookie) recipe includes flour, shortening (often lard), baking powder or soda, milk (buttermilk or sweet milk) and sugar. Common savoury variations involve substituting sugar with an ingredient such as cheese or other dairy products. Shortbread is a popular biscuit in the UK.
In the United Kingdom the term cookie often just refers to chocolate chip cookies or a variation (e.g. cookies containing oats, Smarties).