The pH of foods has an effect on their shelf life; lower pH levels generally extend the longevity of products. Because most confections are not highly acidic, pH is rarely a factor in their preservation. Rather than relying on pH, confectioners preserve their products by controlling water activity.