Modern flush toilets use water to collect and remove human waste through a drain to a sewer or septic system. Archaeologists suggest that early versions of the flush toilet were used by civilizations in the Indus Valley more than 5,000 years ago. Despite its ancient origins, the modern flush toilet, as we know today, was invented in 1596 by Sir John Harington. Harington’s design included a bowl to hold the waste and a valve that released water from an elevated tank to wash away the waste. The design was named the Ajax, and was first installed for Britain's Queen Elizabeth I at Richmond Palace. This design was used for more than 200 years until technological advances during the Industrial Revolution resulted in a better and more efficient model. Several designs were invented, but Scottish mechanic Alexander Cummings made a breakthrough by introducing the S-trap in 1775. This feature redesigned the flush by introducing a curve at the bottom of the bowl instead of water flowing vertically. After a flush, the trap retains water that prevents sewer gases from rising to the surface and entering the bathroom. However, the S-trap occasionally jammed or dried up, emitting a foul smell.
In 1880, English plumber Thomas Crapper redesigned the S-trap into a U-trap, which solved the problem of the previous design. The new design proved efficient and was quickly adopted throughout Europe and North America. He founded Thomas Crapper & Co. in London, England, which became the first company to set up a public showroom that displayed sanitary equipment. Crapper advocated for sanitary plumbing and popularized the installation of flush toilets in private homes. Crapper is not credited with inventing the flush toilet, but held nine patents, including the floating ballcock. He also designed the manhole cover that allowed access to for maintenance on clogged sewer systems. Popular culture believes that the slang term "crapper" came to mean toilet given Thomas Crapper's association with the plumbing fixture.
Ancient records show that flush toilets were used by affluent households in the Indus Valley 5,000 years ago. These toilets were different from the flush toilets that exist today. They were made of wood or brick and featured chutes that transported waste to street drains. Several household drains connected to larger sewer lines that discharged into rivers. Similar systems have been discovered in Scotland, Egypt, Rome, and Persian cities. In the Middle Ages, cesspits were introduced to collect human waste from several households, and waste collectors would clean them out occasionally for use in fertilizer industries.