I've done both. And also have popped one between ears with my hand. It works very well, with the following caveat. Egg gives odd sensation as yolk and white run down face, and the pop of the bottle has the sound. I prefer egg. Have known water balloons done too.
But rider needs to be able to ride horse immediately forwards, not give horse time to react in any way but to rider's direction.
It needs to be done ideally with a horse that is developing the habit of rearing to escape work. One that is just beginning to get light in the front end and has started up is when you need to use this. It works, for much the same principle that having a horse bump its head when attempting to load in trailer keeps it from being loaded easily again, at least not without some work.
The horse does not know what has happened, or whether there is a ceiling, if you will above it, and will not continue to go up since it "can't". Therefore it doesn't attempt to rise up.
And you don't carry all of the odds and ends with you on every ride. Just like with the use of a horseshoe nail, stiff brush or point of elbow with a biter/nipper, you set up the situation where the horse is going to try to rear to get out of work. Horses balks and does this at beginning, middle of trail and you know it will rear? There is where you are aiming for.
Horse does this trying to get it in gate, you do the correction there. Etc, etc.
You have ridden out KNOWING the horse will display this at some point, and you are ready for that.
You also can, when horse starts to rear in protest when working in ring, pop with flat of hand the second feet start to rise. Or whenever necessary to reinforce it is a good idea to not go up.
The other methods apply too, as you have shot weight forwards, giving rein, and if horse continues to rise, pop with whatever.
People are way too quick to dismiss the old methods, and want to come up with all sorts of reasons they don't, won't, have never worked. Those people are wrong in their assumptions.
This does work. But if you are too scared to do it, then you don't need to, as you won't be able to pull it off. Horse already has your number, and knows you are weaker than it is.
And too, these methods, when you have a horse that has gone straight up and is about to go over, too late then.
Horses make me a better person.