The idea that our favorite indulgences might actually be good for us is a long-standing and beloved narrative. It’s why people adore stories about centenarians who attribute their longevity to a daily glass of whiskey, or the idea that cheese is what makes French people slim.

It’s likely, then, that the World Health Organization’s announcement Wednesday that regularly drinking coffee may prevent cancer will be met with similar jubilation by the well-caffeinated set. After all, the conclusion represents a rare reversal from the organization’s position 25 years ago, when it cautioned that coffee was possibly carcinogenic.

Too-hot coffee, or any other beverage for that matter, is still believed to cause cancer, the WHO points out. That’s based on studies that have found an association between drinking very hot coffee—close to 160 Fahrenheit—and esophageal cancer. According to The Wall Street Journal, this is “roughly 10 degrees hotter than people in the U.S., U.K. and Europe are accustomed to drinking coffee or tea,” and more consistent with the temperatures of tea or maté served in China and South America.

But the back-and-forth on coffee more broadly, and in particular the question of whether consuming it is harmful, dates back more than a century, if not longer. In the 1870s, drinking coffee was advised for those interested in having good manners. “Unsweetened coffee cures bad breath,” a Tennessee newspaper reported in 1877. (The paper also advised people to eat cheese with a fork, and discouraged girls from strolling away with a gentleman at a picnic.)

In the early 1900s, doctors and health agencies warned that caffeine was essentially “poison,” and that drinking coffee would cause “nerve storms,” according to a 1912 issue of The Salt Lake Tribune. Nervous women, the newspaper cautioned, should abstain from coffee altogether. “Unsteady nerves are foes of beauty,” it said.

But ads for coffee at the time promised scientifically perfected brew that would produce wondrous health effects. Advertisers also marketed special coffee formulas for people who couldn’t handle the real stuff. One ad, published in 1907, read: “Does coffee disagree with you? Probably it does! Then try Dr. Shoop’s ‘Health Coffee.’” Health Coffee apparently wasn’t coffee at all, but brewed from a “clever combination of parched cereal and nuts” and advertised as safe “even for the youngest child.”

Other ads encouraged people to drink coffee not because it was good for you, but as a way of selling pills for indigestion, like Stuart’s Dyspepsia Tablets, featured in the 1920 advertisement below.

Library of Congress

“Good coffee is good for you,” another ad—this one for Hill Bros. Red Can Coffee—promised that same year.

Library of Congress

Over time, the debate about coffee—fueled by a combination of legitimate research, junk science, marketing, and the rumor mill—has amounted to what the writer Andrew Revkin has called “whiplash journalism,” in which sweeping conclusions about what’s good or bad for you contribute to a mess of contradictions. Just reading The New York Times in the 1980s, for instance, might leave someone wondering what to do given that drinking coffee could give you pancreatic cancer, but switching to decaf might put you at a higher risk of a heart attack.

Red wine and chocolate occupy similar places in culture (new technologies, too, are routinely subject to exaggerated ideas about what’s ultimately good and bad for people). In media coverage about the potential health benefits associated with resveratrol—a substance found in grapes, chocolate, and red wine—one important detail is often buried: the fact that you would have to drink dozens of bottles of wine per day to get a potentially beneficial dosage of the chemical. (And by then, you’d be dead.)

Today, the health effects of coffee are of great enough interest to necessitate their own Wikipedia page—which is at least one way to measure cultural influence. But even the World Health Organization’s news on Wednesday doesn’t dramatically change conventional wisdom (or challenge recent research) about the beverage. Last year, the top nutrition panel in the United States concluded that, for adults, three to five cups of coffee daily—the equivalent of up to 400 miligrams of caffeine—is tied to reduced risk of cardiovascular disease and type 2 diabetes. After that, in the U.S. Department of Agriculture’s new dietary guidelines, coffee consumption was described as being part of a “healthy dietary pattern,” citing a protective association between coffee intake and the risk of Parkinson’s disease. (Though it did caution against overdoing it with sugar and cream.)

“Coffee has a long history of being blamed for many ills,” writes the Mayo Clinic on its website, “from stunting your growth to claims that it causes heart disease and cancer. But recent research indicates that coffee may not be so bad after all. So which is it—good or bad? The best answer may be that for most people the health benefits outweigh the risks.”