@Gowi@ScreenAcne *waves*
@Ganryu I like you. You have the best response here.
@Ellri I love lore. I love complex, detailed worlds. So either I want to be able to find the information somewhere, or have the DM tell me when I ask, or I want to be able to come up with my own ideas. I hate it when things don't line up properly. However, for making an rp, you have to keep in mind that not everyone agrees, and some people don't like lengthy discussions on what the impact of a single group trying to gain control of all the magic crystals will do to the world in general. And then there's groups where people are fine with having profiles for various nations, including culture, economics, government, religion, major exports, military, and general temperament, as well as in-depth descriptions of many deities, and complex relationships (I kid you not, but this rp was two entirely separate campaigns, one two hundred years after the first, and we spent years on it as well as two of us writing various stories in the setting. Including one of the main DMs, who is very good at this sort of thing and won NaNo with his tale of the nuclear war that took place shortly after the conclusion of the first rp). We have an entire forum to keep track of it, and no, a lot of it doesn't have direct relevance, but it's nice to have around.
So in the end, it depends on what you're going for. If you're doing sandbox, set up a basic framework and turn people loose. If you have an established setting, let the players know the information their characters would know beforehand, and add to it as needed as new things come up. Pay attention and either correct or work with mistaken assumptions that conflict with things you've decided but not revealed. Flexibility for things that are not plot points is always a plus, and a willingness to discuss ideas with players is good as well. If your rp is going to be heavily plot driven, all that applies and you need to make sure everyone involved has a solid motivation for doing what they will be doing, even if it's not something they want to do. It's not necessary to have everything fleshed out, but make sure you say "welp, I actually haven't constructed x nation yet because I expected you guys to fight, not flee the country, but sure, let's make it now" or find a /good/ reason why it's not possible to go there. There's ways to work around undefined lore, but arbitrary rules and railroading is frustrating.
If you are picky about your setting, and don't want people tampering with the vision you have in your head, then you need to be very involved in discussing it and answering questions. Anything that's not a huge reveal should be accessible somewhere, be it a post or by request. If there's a core concept you can't share yet but that restricts things, that's a fair reason, but let players know that if they ask for information on that concept. Make sure that you have the details you want worked out ahead of when they're needed, and be able to make up more on the spot when needed, and make sure everything fits together.
You don't have to tell everything right away in any case, but it's a good idea to know it. In Ganryu's example, we might not need to know the king 300 years ago if not relevant, but if there's some statue of the king in the square with his name, our characters would probably be aware of who he is, so the knowledge of [name] being king and possibly a timeframe should never be a surprise to the characters later on. Finding out the king didn't really die and went into hiding instead and now works as a traveling musician would be a surprise. If he still uses the name he had when he was king, you /might/ wanna mention that the minstrel shares a name with the king whose statue is in the square, but don't have to say that it's the same guy.
Of course, all of this assumes that players want consistency and structure. My personal opinion is that rps, like any other form of storytelling, should make sense unless the point is not to make sense. It's not always necessary to know why, but there should be a reason behind the scenes. If there's a lot of lore, making a structured reference that can be consulted as needed might be a good idea, but note that players don't need to know every detail if they join late to keep them from getting discouraged.
tl;dr WOO LORE! ALL THE LORE! I like knowing, I like people that are willing to discuss and work together to make more lore as needed, I like being able to help create, I like details. I like being able to ask and theorize and plan. I absolutely hate being told I can't know something that my character would know. If my character has a good reason to know some fact, you can't plan that fact to be a surprise to the player without a very good reason and a skilled execution, and I've not seen it done well often. ^.^