The modern-day milk carton in the United Stated was invented in the early 1900s by John Van Wormer. Before then, glass bottles were generally used.
Beginning in the late 1800s, many rural citizens were responsible for providing milk to the growing population of town and city dwellers. Farmers would hand-milk cows and deliver milk to customers in glass bottles.
With the advent of mechanized milking at the beginning of the 20th century, farms grew and so did milk production. At this time, homeowners used iceboxes; refrigerators had not yet been invented. When milk was stored in ice boxes, it tended to go bad because ice boxes did not efficiently insulate the glass bottles. This problem brought about the method of the milkman bringing fresh milk every day and taking away empty bottles.
John Van Wormer received a patent for the milk carton in 1915. It’s called a gable-top because the spout is glued into a peak then opened by pinching and pulling. The original carton was made from paperboard; the same material is used today, but a polyethylene coating has been added so that the milk doesn't soak through. It took a while for this new container method to become common, as people had become accustomed to glass bottles.