Whether you like Coca-Cola, Pepsi, Dr. Pepper or Sprite, soda lovers all have a favorite way to drink their favorite fizzy beverages.

Some swear by the cold can, others enjoy sipping from glass bottles, and many prefer sipping it through a straw from a fountain machine-made drink.

But isn't soda the exact same drink no matter how it gets to your mouth? The surprising answer is that the way soda is served can vastly change its taste. But why?

TODAY Food asked a food industry insider to help break it all down.

Carbonation is key.

A key ingredient to any great soda is carbonation, including how much the drink contains, how long it holds its bubbles and even how it’s mixed, which all affect the flavor and overall enjoyment.

Gina Chersevani, owner of Buffalo & Bergen, a restaurant in Washington, D.C. that was inspired by classic soda shops, uses a vintage soda machine from the 1930s to create authentic drinks for her customers. She told TODAY Food that a classic fountain drink is made by using both fine and coarse streams of carbonated water that mix the syrup poured into a glass.

At her restaurant, Chersevani is able to manually control the mixing, as well as how much carbonated water and syrup goes into each drink, whereas standard restaurant soda machines mix the syrup with the water before it goes into your cup.

She explained that the pressure, which keeps the water carbonated, needs to be constantly calibrated and is often just left alone at a restaurant. This explains the flat-tasting drink we've all unwittingly experienced from time to time.

The scoop on syrup.

Syrup is also an important component of any good fountain drink. Drinks will be more or less sweet, depending on how much syrup is used.

Shutterstock

Chersevani likes to keep her drinks to 14 grams of sugar — or less — which is more in line with classic soda counter recipes of yesteryear when drinks weren't so sweet. “Bigger [restaurant] chains increase syrup [content] to make it sweeter,” she told TODAY Food.

For example, a small fountain Coca-Cola from McDonald's has 40 grams of sugar, while a 20-ounce Coca-Cola at Panera Bread has 67 grams of sugar.

McDonald’s has long been lauded as having one of the best-tasting Cokes out there, and when it comes to syrup, the company says on its website that they use a “ratio of syrup set to allow for ice to melt.”

A 2014 New York Times article also claimed that McDonald’s gets special treatment from The Coca-Cola Company, as it gets its syrup delivered in stainless steel tanks “for freshness,” while other restaurants receive their syrup in plastic bags.

Keeping it cold.

Keeping soda cold is also key to carbonation, said Chersevani. “The carbonation will fall apart almost instantly if it’s not cold,” she said.

McDonald’s says its syrup is “pre-chilled” before entering fountain dispensers and that they always keep the fountain system cold to ensure a thoroughly ice-cold beverage experience.

Roberto Machado Noa / Getty Images

Ice can also help maintain a chilled temperature and Chersevani said that crushed or “chewable” ice is best, as it has more surface area for the bubbles to grab onto.

This is also where flavor may be affected in aluminum cans, as well as plastic and glass bottles. Chersevani said glass can keep the drink cold the longest, whereas plastic is the least successful at keeping liquids chilled.

The story on straws.

Straws are also a traditional part of drinking soda at a soda fountain. Chersevani said straws are important because they allow you to drink from the bottom of the glass where the drink is more likely to still be mixed in the right proportion of syrup to carbonated water.

She explained that water and the syrup will naturally begin to separate within soda and recommended drinking any soda within about 30 minutes or being poured to maintain the correct concoction mix. She also opts for corn-based straws at her restaurant, instead of plastic or paper straws, which she said don't work as well with sodas.

McDonald's

McDonald’s says it uses a slightly wider straw, too, “so all that Coke taste can hit your taste buds,” though the restaurant chain has pledged to stop using plastic straws at many of its restaurants by 2019. Perhaps a wide, reusable straw will soon be an option.

Contain yourself.

A tall glass is the best bet for drinking any soda, advised Chersevani. “[The drink] needs room for the carbonation to move up and down, as well as more surface area for the bubbles to cling to the walls and go up and down to continue to mix the drink,” she said.

Courtesy Coca-Cola

When it comes to aluminum, plastic or glass bottles, she said aluminum is the most porous, allowing carbonation to escape, followed by glass and then plastic, which holds carbonation the best.

While fans may argue that Coca-Cola tastes different when sipped from a can versus slurped through a bottle, the company says the recipe and manufacturing process is the exactly the same for both.