Commercial mayonnaise has an undeserved bad reputation as a cause of food spoilage—and in turn, food poisoning. You've heard the warnings: Don't leave potato salad out at a barbecue; don't bring mayonnaise to a picnic; don't send your child to school with a tuna fish sandwich unless you include a cool-pack. But certain ingredients in commercially made mayo may actually help keep the sandwich spread fresh, whereas it is homemade mayonnaise you need to worry about.
Truth be told, it is usually cross-contamination from the other ingredients (like the chicken in a chicken salad) that causes the foodborne illness, not the prepared mayo.
Mayonnaise at its most basic is made of oil, egg yolk, and an acid such as vinegar or lemon juice. But have you ever read the ingredient list on a jar of mayo? Commercial mayonnaise is loaded with acid and preservatives that can actually extend the life of the condiment by killing bacteria. In addition, the eggs used in prepared mayonnaise are pasteurized to kill harmful bacteria
A study published in the Journal of Food Protection found that when commercially made mayonnaise was mixed with contaminated chicken and ham, the mayo actually slowed—or even stopped—the production of salmonella and staphylococcus bacteria. The more mayonnaise that was added, the slower the growth of bacteria became.
On the other hand, homemade mayonnaise carries more risk if not handled properly.
Traditional homemade mayonnaise contains raw egg yolks, so foods using homemade mayo should be eaten immediately or properly refrigerated. The best bet is to make up only the amount of mayonnaise that you need, and do not plan on leftovers. Homemade mayonnaise will last only up to a week when properly refrigerated.
The good thing is that it is quick and easy to make your own mayo, so you should not need the convenience of jarred mayonnaise except for that last minute sandwich. If you are not comfortable using raw egg yolks, the perfect solution is to purchase irradiated eggs which are now available in most markets. Irradiated eggs carry no risk of salmonella contamination and are perfectly safe to use in raw preparations.
If you are unable to find irradiated eggs but don't want to take the risk of using raw eggs, you can make a cooked mayonnaise recipe. Cooked recipes warm the egg yolks just to the point where any bacteria will be killed but not enough to actually cook the yolks.