(CNN) The thought of a vaccine might conjure up memories of that flu shot you get each year, or taking your kids to get their immunizations against polio or measles. Cancer rarely comes to mind when most people think of vaccines, but that appears to be changing.

Over several decades, cancer vaccines have emerged as a form of immunotherapy, a treatment approach that stimulates or restores the body's own immune system to either help prevent cancer from developing or help treat an existing cancer.

The HPV vaccine is among the best-known cancer preventive vaccines. It helps prevent human papillomavirus infections. Certain HPV infections are associated with cervix, vagina, vulva, penis, anus, rectum, and head and neck cancers.

As for cancer treatment vaccines, the first to be approved by the Food and Drug Administration in the United States is Provenge or sipuleucel-T , which harnesses a patient's own immune system to attack cancer cells. The vaccine is approved for use in some men with prostate cancer.

"Whether used for prevention of infectious diseases or for prevention and treatment of cancer, vaccines work by similar mechanisms: They teach the immune system how to recognize the infectious pathogen or the cancer cell as something foreign that needs to be eliminated," said Dr. Dmitriy Zamarin, a cancer immunologist at Memorial Sloan Kettering Cancer Center in New York who researches vaccines.

"In the case of cancer, various vaccine strategies teach the immune system to recognize a protein, also known as antigen, or a part of a protein that is present on the surface of cancer cells but not normal cells," he said. "By targeting these proteins, the immune system can specifically eliminate cancer cells while leaving normal cells intact."

Here's a look at the past successes and failures of cancer vaccine research, and where the future of research is heading.

19th century: The 'father of immunotherapy'

In the 1890s, the man who is considered " the father of cancer immunotherapy " noticed something in his cancer patients that would forever impact the course of cancer research.

To test this, Coley concocted a mixture of bacteria. He used a cocktail called Coley's toxins to create infections in his cancer patients in an effort to trigger their immune systems to attack not only those bacterial infections but other parts of the body that appeared foreign, such as a malignant tumor.

Coley described these cases in a study published in the American Journal of the Medical Sciences in May 1893 . One was a 35-year-old Italian man diagnosed with sarcoma of the neck and tonsil.

In the study, Coley detailed how the man's tumor was injected with streptococcal bacteria that caused a skin infection called erysipelas

The patient's temperature rose to 105 degrees Fahrenheit as the skin infection appeared on his neck and gradually extended over his face and head, Coley wrote.

Then, "the tumor of the neck began to break down on the second day, and discharged until the end of the attack. The discharge was not pus, but resembled the caseous material of the tubercular gland," he wrote. "At the end of two weeks the tumor of the neck had disappeared."

Meanwhile, the patient's tonsil tumor appeared smaller, but the reduction in size was not as significant, Coley noted.

Despite that case and others, Coley's toxins were not widely accepted as a possible cancer treatment option for years to come.

1920s-'30s: A turn of opinions

"Basically, no one understood the mechanism," said Jill O'Donnell-Tormey, chief executive officer and director of scientific affairs of the Cancer Research Institute in New York.

In other words, no one knew exactly how Coley's toxins were related to a reduction in tumor growth. Making matters worse, the toxins were a "crude" mixture of bacteria, O'Donnell-Tormey said.

"There was no standardization, so every batch was somewhat different, and some were more potent than others, so you got a variability of response," she said.

"Some patients responded, and some didn't, and no one understood why ... and then radiation was discovered," she said. "So radiation became kind of the new treatment du jour as a way to treat cancer. It produced more reliable results than Coley's toxins could, and that contributed to it being more widely adopted as a cancer treatment."

By 1920, Coley's research received serious resistance from the Bone Sarcoma Registry , whose role was to standardize the diagnosis and treatment of bone cancers. Members of the registry believed that Coley's toxins were ineffective, dismissing his ideas, according to a paper published in The Iowa Orthopaedic Journal in 2006.

Then, the Journal of the American Medical Association , which had criticized Coley's work, published an editorial in 1934 suggesting that his immunotherapy approach might warrant further research.

"Although Coley first employed a vaccine of Streptococcus [erysipelas] in inoperable malignant conditions as early as 1893, a satisfactory explanation of the therapeutic mechanism has not yet been advanced," the editorial began

It ended with, "Further studies on the effect of powerfully antigenic substances in inoperable malignant conditions or as a postoperative measure in attempting to combat recurrence seem to be indicated in the light of the accumulated evidence."

1950s-'70s: Repurposing a tuberculosis vaccine

Coley's daughter, Helen Coley Nauts, founded the Cancer Research Institute in 1953 to revive the research that her father started.

"Helen was convinced that the medical community had dismissed her father's work prematurely," O'Donnell-Tormey said.

Around that time, cancer immunologist Dr. Lloyd Old and other researchers began investigating incorporating the tuberculosis vaccine bacille Calmette-Guérin, or BCG, into an experimental cancer treatment approach.

In a study in the journal Nature in 1959, Old and his colleagues describe how the growth of sarcoma tumors transplanted into mice was inhibited if the mice were infected with BCG.

JUST WATCHED Fighting cancer by targeting its 'Achilles' heel' Replay More Videos ... MUST WATCH Fighting cancer by targeting its 'Achilles' heel' 01:51

For the study, the mice were either implanted with solid tumors or injected with cancer cells at various intervals after being injected with BCG.

The researchers found that the BCG infection still appeared to protect the mice against tumor growth even if tumors developed 67 days after the mice received the BCG injection.

"The tumors in bacillus Calmette-Guérin infected animals developed normally for the first seven to 10 days and then began decreasing in size after the second week," the researchers wrote in the study

BCG has since been developed as an immunotherapy to treat bladder cancer . Once put directly into the bladder through a catheter, BCG can activate the body's immune system cells and attract them to the bladder, according to the American Cancer Society

In 1971, Old was appointed the Cancer Research Institute's medical director , and in the years to come, he and other researchers continued to advance cancer vaccine research with many other studies.

However, some of those studies were not as successful as others.

1980s-2000s: Turning a spotlight on antigens

With vaccines, researchers typically try to stimulate the immune system to attack cancer cells by giving the immune system targets to go after. Those targets, found on the surfaces of cancer cells, are called antigens

But normal cells in the body also sometimes sport the same antigens as cancer cells. When that happens, the immune system can attack a patient's own body, not just the cancer, causing the vaccine to fail and even turn deadly.

"The history of cancer vaccines has been riddled with a lot of failures," O'Donnell-Tormey said, and many of those failures happened in the '90s and 2000s.

To address this issue, Old started to examine cancer-specific antigens as part of the Cancer Vaccine Collaborative , a joint research initiative established in 2001 between the Cancer Research Institute and the Ludwig Institute for Cancer Research.

"Many people thought things like vaccines had been tried and failed, and he kept on saying, 'But they've never been tried in the right way,' " O'Donnell-Tormey said of Old, who died of prostate cancer at age 78 in 2011.

"I think vaccines are coming back," she said. "They had a very bad rap for a number of years because there was so much failure, but I think they failed because we didn't understand the biology enough."

2010s: The hope and hype

Cancer vaccines made a big comeback when the FDA approved Provenge or sipuleucel-T for treatment of prostate cancer in 2010.

JUST WATCHED A lung cancer vaccine was created in this lab Replay More Videos ... MUST WATCH A lung cancer vaccine was created in this lab 06:47

In 2016, researchers found that a personalized cancer vaccine created with patients' own acute leukemia cells may be protective against disease relapse. They published their findings in the journal Science Translational Medicine

The researchers tested the vaccine in 17 acute myeloid leukemia patients who had received chemotherapy. The vaccination was found to be well-tolerated, and after receiving it, 12 of the patients remained in remission for an average of four years and nine months.

"The majority of cancer vaccines will not be clinically effective on their own. They probably need to be combined with other agents that deal with the immunosuppressive milieu around a tumor, such as checkpoint blockades or another type of treatment," said O'Donnell-Tormey, who was not involved in that study.

"We've learned that every person's tumor -- even if it's all breast cancer or all colon cancer -- all have their own antigens, or the markers that the immune system see that are very personalized to that individual patient," she added.

Though some studies have shown certain cancer vaccines to be effective, other cancer vaccine trials have not been as successful.

For instance, the company Celldex Therapeutics announced in 2016 that a phase three study of a cancer vaccine candidate for glioblastoma , the aggressive type of brain cancer that Sen. John McCain was diagnosed with last year, was unlikely to "reach statistical significance for overall survival in patients with minimal residual disease." That study was discontinued.

Those are just a couple of examples of failed cancer vaccine studies.

Yet as research continues to move forward, scientists are turning their attention to personalized cancer vaccines , which means the vaccine could be tailored to the specific cancer cell mutations within an individual patient.

"We have learned to recognize that the most optimal targets for vaccines are the tumor proteins that have resulted from mutations in the tumor DNA," said Memorial Sloan Kettering Cancer Center's Zamarin.

"With advancement in the DNA sequencing technology, we have recently seen the emergence of personalized cancer vaccines," he said. "In the future, we will likely see an explosion of such strategies, which will also most effectively be used in combination with other drugs targeting various mechanisms by which tumors escape the immune system."

The idea of personalized cancer vaccines seemed like "complete science fiction" a few years ago but seems more possible as research evolves, said Dr. Seth Pollack, assistant member of the clinical research division at the Fred Hutchinson Cancer Research Center in Seattle and an assistant professor at the University of Washington.

"To make a personalized cancer vaccine, you need to look at the genetic changes that have specifically happened in your cancer and very quickly make a customized vaccine specifically designed for you. With this sort of approach, any cancer patient could have a custom-made vaccine to treat or prevent recurrence of their cancer," Pollack said.

"We have been doing a lot of work using vaccines for certain types of sarcoma, rare cancers that frequently affect young people. This approach seems to have a lot of promise in this population," he said. "Another thing that I think is really exciting right now is the development of some very high-tech vaccines. There are vaccines that are genetically engineered to program the immune system in a certain way and others that are linked to immune stimulants that can directly encourage immune cells to react to the vaccine."

2018: What the future holds for cancer vaccines

This year, two separate studies led by researchers at Stanford University have shown experimental vaccines as possible treatments for cancers in mice.

The study involved experiments on hundreds of mice genetically engineered to develop lymphoma, melanoma, colon and breast cancers. In one of those experiments, among 90 mice treated with the vaccine, only three had tumors occasionally recur, the researchers found.

"When it didn't work in the few mice that it didn't work in, we could redo the treatment and make it work still. So the escaping tumors were not resistant to this treatment. They were just getting away from the immune response by chance," said Dr. Ronald Levy, a professor of oncology at Stanford University and lead author of the study.

The researchers developed the vaccine to target antigens on the tumors in the mice. The researchers noticed that the vaccine was "able to race against" genetics in eradicating the cancer even though the mice were engineered to develop the disease, Levy said.

Still, "it's important to say that this was conducted in mice in the laboratory," he said. "We plan an initial clinical trial in (human) patients with low-grade lymphoma. This is partly because so much of our mouse experiments were in lymphoma and partly because lymphoma is the cancer of the immune system."

JUST WATCHED Immunotherapy cancer treatment a game changer? Replay More Videos ... MUST WATCH Immunotherapy cancer treatment a game changer? 01:40

stem cells to be effective in As for the other Stanford study, published Thursday in the journal Cell Stem Cell, researchers found a cancer vaccine developed with induced pluripotentstem cells to be effective in preventing the growth of breast, lung and skin cancers

The researchers injected dozens of young adult female mice, 6 to 8 weeks old, with the vaccine. Four weeks later, they injected the mice with cancer cells. The researchers monitored tumor growth in the mice over the course of four weeks.

At four weeks, the researchers found that the tumors in the mice that were vaccinated were shrinking while the tumors in those that were not vaccinated grew.

"Before cancer is even developed, we gave the immune system a chance to be activated to target potential cancer cells. So that's the entire idea behind our study: You provide the immune system with a broad panel of possible antigens that could be on your future cancer cells, so you already have the immune system ready to go, so that whenever these cells start popping up, you can start attacking them," said Dr. Nigel Kooreman, first author of the study and a postdoctoral fellow at Stanford University School of Medicine.

"The mouse immune system is not the same as the human immune system, so it will be interesting to see if whatever we found in mice will translate to humans," he said, adding that the researchers now are setting up those preliminary studies in humans.

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

Based on the similarities that the researchers saw between the stem cells in their vaccine and the various cancer cells in the study, they think their vaccine could work against some other cancers too, said Dr. Joseph C. Wu, a professor of medicine and radiology at Stanford and senior author of the study.

"Fifty years ago, the measles, mumps and rubella vaccines were developed that saved many lives," he said. "Wouldn't it be nice if, 20 years from now, people would get vaccinated with their own induced pluripotent stem cells to prevent cancer?"