In North America, a sweet biscuit; the Cookie Monster, a member of the Muppets, was a large blue friendly creature characterized by its sweet tooth and voracious appetite.
In computing, cookie is a packet of data sent by an Internet server to a browser, which is returned by the browser each time it subsequently accesses the same server, used to identify the user or track their access to the server.
the way the cookie crumbles how things turn out. It is often used retrospectively, to suggest that the position is undesirable but unalterable.
See also fortune cookie.