Since prehistoric times, snow and ice were used for cooling. The business of harvesting ice during winter and storing for use in summer became popular towards the late 17th century. This practice was replaced by mechanical ice-making machines.
Modern air conditioning emerged from advances in chemistry during the 19th century, and the first large-scale electrical air conditioning was invented and used in 1902 by US inventor Willis Carrier. After graduating from Cornell University, Carrier found a job at the Buffalo Forge Company. There, he began experimenting with air conditioning as a way to solve an application problem for the Sackett-Wilhelms Lithographing and Publishing Company in Brooklyn, New York. The first air conditioner, designed and built in Buffalo by Carrier, began working on 17 July 1902.
The first air conditioners and refrigerators employed toxic or flammable gases, such as ammonia, methyl chloride, or propane, that could result in fatal accidents when they leaked. Modern refrigerants have been developed to be more environmentally safe than many of the early chlorofluorocarbon-based refrigerants used in the early- and mid-twentieth century. These include HCFCs (R-22, as used in most U.S. homes before 2011) and HFCs (R-134a, used in most cars) have replaced most CFC use.