During the 1830s there was a humoristic fashion in Boston newspapers to reduce a phrase to initials and supply an explanation in parentheses. Sometimes the abbreviations were misspelled to add to the humor. OK was used in March 1839 as an abbreviation for all correct, the joke being that neither the O nor the K was correct
sursa: urban dictionary