Suggestions for decreasing metagaming and increasing player immersion?

This question is posed in a great way over on the Paizo boards, where I hang out since I play/run a lot of Pathfinder. Immersion is one of the key parts of the RPG experience to me, so I loved the question, and wanted to open it up to this community and also generalize it to other RPGs.

(Quick clarification – “immersion” in the sense of “players take on the roles of their characters in the game world as much as possible”. We used to call that “roleplaying” till the term got co-opted, and now some folks are trying to use immersion in different senses, like “engrossed in the story”. This question is only about in-character immersion.)

What are your favorite techniques – as a GM or even as a player – for promoting and maintaining character immersion (aka “roleplaying your character”) over metagaming? Where metagaming is “I know what I rolled,” “I know all the monsters in the manual,” “In 90% of plots this guy would be the bad guy,” or other things that should properly be outside the game fiction? I’ve tried to do this as a GM but also struggled with it as a player; I resent it when I feel like I’m “forced to metagame” by the scenario or GM to keep the adventure going.

In the OP, there’s a lot of focus on making rolls behind a screen, especially skill checks and saving throws and the like, or having the GM track hit points instead of the players. Some of that works well, but in practice could overwhelm the GM and disenfranchise players who want some sense of “ownership” over their characters. I’d like to hear techniques people have actually used (not untried opinions) and how well they worked and what their side effects were.

To set a good example, here’s one answer from me – I ran a multiyear campaign where as GM I practiced strict information compartmentalization – I didn’t say things in front of the group that only a subset of the party witnessed. I passed notes and took people aside. This worked very well in terms of helping people immerse and keep a realistic in-world viewpoint. But it did slow the game down, especially once things got more interactive and the player was writing multiple notes back for clarification, or a “take half the party aside” turns into 30 minutes of action excluding the other characters. I tried to mitigate that by going back and forth to spread spotlight time, but sometimes one group would just say “We sit here and wait for them to be done with whatever the hell they’re doing…”