Like many condiments, ketchup can be stored either in the refrigerator or on the shelf even after it’s been opened. If you don’t use it regularly, however, opt for the fridge. Unopened ketchup will last at least a year. Once opened, it should be used within a month if stored in the cabinet or within six months if stored in the refrigerator.
Unopened mayonnaise stored in the pantry should ideally be used by the “Best By” date on the package (but in most cases will still be good for up to four months after that date). Mayo is made from eggs, so it must be refrigerated once it’s been opened. A jar will last up to three months in the refrigerator and should never be left on the counter for more than an hour or two.