For all you coffee drinkers out there always worried about spilling, you might want to start opting for a latte instead. A new study reveals why lattes, cappuccinos and other foamy drinks are less likely to slosh over the rim compared to a cup of Joe.

By studying the physical dynamics of liquids when jostled around, researchers found that five layers of foam bubbles limited the height of waves 10-fold as compared to plain liquid such as coffee.

The research, published in the aptly-named journal Physics of Fluids, doesn't just provide some guidance in terms of your Starbucks order, but may also have industrial applications - such as preventing the sloshing of oil and other potentially dangerous substances during transportation on trucks, ocean tankers or trains.

Researchers also found that the typically unwanted foam sitting atop your beer has advantages comparable to those of a latte's milk bubbles.

"While I was studying for my Ph.D. in the south of France, we were in a pub, and we noticed that when we were carrying a pint of Guinness, which is a very foamy beer, the sloshing almost didn't happen at all," Alban Sauret, a researcher at the French National Center for Scientific Research (CNRS), said in a statement.

So Sauret and his colleagues took their curiosity from the coffeehouse and pub to the lab, where they conducted experiments to test the "damping" power of foam. The team constructed a narrow rectangular container made of glass, and filled it with a solution of water, glycerol (which increases the fluid viscosity) and dishwashing detergent. By injecting air at a constant flow rate, the researchers created uniform layers of 3-millimeter-diameter bubbles, and found that foam makes all the difference.

If you're constantly spilling beer or getting coffee stains on your sleeves, a nice latte or foamy Guinness may be the answer.

For more great nature science stories and general news, please visit our sister site, Headlines and Global News (HNGN).