Another thing that can work, although its a little higher risk of a bite, is to reach in BEHIND the snakes head, and gently stroke its back. That will usually provide the same result as the gentle tap on the head.
Even if they are not in a strike position, I don't go in directly in front of their faces. Thats kinda like looking an aggressive dog directly in the eyes. They're more likely to see your approach as a threat.
Steve
Yeah...I got a wicked bite from a big Boa doing this,. Even if they can see you in front of them, that hand on the neck can feel like a prey item.