Unopened containers of mayonnaise have a maximum shelf life of three months. Opened containers of mayonnaise have a maximum shelf life of two months if refrigerated after opening. Opened containers of mayonnaise should never be left out of the refrigerator for periods exceeding two hours.
One of the primary ingredients in mayonnaise is egg yolks, the part of the egg that contains the most protein. Because the bacteria that cause food poisoning grow rapidly on foods that contain protein that are at temperatures ranging between 40 and 140 degrees Fahrenheit, it is safest to refrigerate mayonnaise as soon as possible after opening.