There's a book I remember reading as a kid, full of dragons and princesses and wizards--all the usual fantasy kid stuff. Except that's got nothing to do with why I remember it, and honestly there's just one thing that still sticks in my head after all these years. While one of the characters is riding a magic carpet it suddenly takes a plunge, which could have been described in any of a dozen ways. The author chose, "it was like the bottom falling out of a cardboard box," which was descriptive enough even if it kind of bothered me for some unspoken reason ...
And thus did I discover anachronism.
This was an easy one to spot and an easy one to remedy; another good example would be the story of a well-known author who mistakenly thought a foot was equal to a meter and used them interchangeably in a novel. (Though you'd think an editor would notice?)
But even as a kid I knew the OK rule. That is, you don't ever use the word OK (Ok, so okay is a word--OK is an abbreviation. You got me) until after, say, the year 1850. Because it didn't exist before that. Knights and princesses didn't say OK. Nor did pirates, assassins, merchants, mercenaries. Or anybody who existed before the word was invented.
Let's just be reasonable for a moment: you shouldn't be writing dialog that didn't exist for your characters when, supposedly, they do. You wouldn't use slang like "rad!" or "groovy!" or "sweet!" or "pwn!" for a character existing outside of these words' respective time periods. And though OK has lasted a fairly long time, it's slang, too.
For me it was always easy to find a substitute that sounded a bit more suited to the time period--or at least less slangy. Things like "sure" or "very well" or "all right" all mean the same thing as OK, while having existed historically.
(And don't get on me about translating your story from another language and therefore thinking it's OK to use OK as a 'translation' for some made-up word. Because it doesn't make sense to translate a period word for one that's not. And anyway, a lot of languages around the world these days use OK just as we do in English. There really is no straight translation for it!)
(And on the topic of all right--it's not alright. Alright's not all right, just like OK's not okay. And generally I prefer to use the word, okay, instead of the abbreviation. But OK just shows up better when writing for emphasis. Like I'm doing now.)
All authors want to write comprehensible, easy-to-read dialog, but if you are writing in a time period that's not your own--yes, even one of your own devising--you need to stay true to it.
Which means that taking even one word out of context is not OK.