The ice cream soda was invented by Robert McCay Green in Philadelphia, PA, in 1874 during the sesquicentennial celebration. The traditional story is that, on a particularly hot day, Mr. Green ran out of cream for the flavored sodas he was selling and used vanilla ice cream from a neighbor and invented a new drink.
His own account, published in Soda Fountain magazine in 1910, states that while operating a soda fountain at the Franklin Institute's semi-centennial celebration in Philadelphia in 1874, he wanted to create a new treat to attract customers away from another vendor who had a fancier, bigger soda fountain. After some experimenting, he decided to combine ice cream and soda water. During the celebration, he sold vanilla ice cream with soda water and a choice of 16 different flavored syrups. The new treat was a sensation, and soon other soda fountains began selling ice cream sodas. Green's will instructed that "Originator of the Ice Cream Soda" was to be engraved on his tombstone.
There are at least three other claimants for the invention of ice cream soda: Fred Sanders,Philip Mohr (in 1782 at Fulton and First Streets in Elizabeth, NJ), and George Guy, one of Robert Green's own employees.
Regardless of its origins, the beverage quickly became very popular, to such a degree that it was almost socially obligatory among teens, although many adults abhorred it. According to some accounts, it was banned, either entirely or on holy days, by some local governments, giving rise to a substitute treat, the sodaless ice cream sundae. As soda was marketed as a miracle cure, it was often considered a substance that required oversight and control like alcohol, another controlled substance that could not be served or purchased on Sundays in many conservative areas. Many soda fountains had to figure out a way to turn a profit on Sundays when selling soda was considered illegal. The solution was to serve ice cream on these days, as it is merely a food product and not a controlled substance. Soda fountains then coined the term "Sundaes" for the ice cream concoctions that they served on "soda's day of rest".