2 [with adjective] informal a person of a specified kind:she’s a tough cookie
3Scottish a plain bun.
4 Computing 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.
that's the way the cookie crumbles
informal, chiefly North American that’s the way the situation is, and it must be accepted, however undesirable:‘It’s so unfair.’ ‘That’s the way the cookie crumbles.’
early 18th century: from Dutch koekje 'little cake', diminutive of koek