We all know if you shake up a can of soda and open it, it will cover the immediate area in a sugary mess. A lot of people think tapping the top of the can will prevent this, but that's actually not the case. If the can doesn't explode after tapping the top, then it wasn't going to explode anyway. Fortunately, there is a method that will work to prevent a shaken can from exploding that is just as simple.
Soda gets its fizz from carbon dioxide gas. Since gas is lighter than liquid, the CO2 rises to the top of the container, sitting above the liquid layer. The "hiss" sound you hear when opening soda is this gas being released. When you shake the container up, the gas and liquid gets mixed together which forms carbon dioxide bubbles. This gas still wants to escape, but now it must pass through all the liquid. So what does it do? It brings the liquid along with it and there's your explosion.
As is described in the video below, when the carbon dioxide gas gets mixed with the liquid, the bubbles attach to imperfections on the side of the can. Given this piece of info, all you have to do is flick the sides of the can to release the bubbles back to the top where they belong. Then you can open the can without getting soaked.
See the process in action below!