Ralph Morse/Getty Images

While the folks at Coca-Cola claim that their drink tastes the same whether it’s served in a can or a two-liter plastic bottle, most people swear it just tastes better when it comes in an icy cold glass bottle. (Ideally from a gas station cooler after a hot day of fishing on Lake Pontchartrain.)

While the good people of Coca-Cola make a good point that their secret formula doesn’t change whether you are taking a refreshing sip from a can or a bottle, turns out that the packaging itself might affect the taste. According to food chemist Sara Risch, founder of food and packaging consultancy Science by Design, while the soda’s formula remains the same, the plastic, aluminum, or glass packaging can impact the flavor as the liquid reacts with polymers in the packaging, she told Popular Science.

Not to give you too many flashbacks to high school chemistry class, but according to Popular Science, polymers are the molecules inside the packaging that can add properties to the material they are used in. For example, aluminum cans are lined with a polymer that can absorb small amounts of flavor and plastic bottles may transfer acetaldehyde that can alter the way a drink tastes. Glass is a more inert material than either aluminum or plastic, so it’s less likely to affect the flavor of your drink. That’s why drinking out of a glass bottle may be the way to get the purest Coca-Cola flavor.

WATCH: This Is Why McDonald’s Coke Tastes Better Than All the Others

It’s important to note that the Food and Drug Administration (FDA) closely monitors food packaging to make sure that toxic or dangerous chemicals don’t leach into food or drink. That said, the packaging is in constant contact with the food or drink that it holds. "While packaging and food companies work to prevent any interactions, they can occur," Risch says.

If you can’t find glass bottles and are forced to choose between aluminum and plastic, opt for aluminum. As RD.com notes, the carbon dioxide that gives Coca-Cola its trademark refreshing fizz is more likely to leak out of plastic bottles than aluminum cans, because plastic is much more CO2-permeable. If plastic is the only option, store the bottles in a cool dark place out of the sunlight—or simply buy all your Cokes from the gas station cooler on a hot day and use the two-liter bottles for Coca-Cola cakes.