1703, American English, from Dutch koekje "little cake," diminutive of koek "cake," from Middle Dutch koke (see cake (n.)). Slang application to persons attested since 1920. Phrase that's the way the cookie crumbles "that's the way things happen" is from 1957.
A collection of information, usually including a username and the current date and time, stored on the local computer of a person using the World Wide Web, used chiefly by websites to identify users who have previously registered or visited the site. Cookies are used to relate one computer transaction to a later one.
To behave properly; KEEP one's NOSE CLEAN: If he doesn't toe the mark, fire him
[entry form 1813+, variant 1895+; fr the mark or line indicating the starting point of a race]