A Parisian named Nicholas Appert came up with the idea. A jack of all trades, Appert used his experience as a former candy maker, vintner, chef, brewer and pickle maker to perfect his technique. After experimenting for 15 years, Appert successfully preserved food by partially cooking it, sealing it in bottles with cork stoppers and immersing the bottles in boiling water. His theory of canning was all his own—Pasteur's discoveries regarding bacteria were still almost a half-century away. But Appert assumed that, as with wine, exposure to air spoiled food. So food in an airtight container, with the air expelled through the boiling process, would stay fresh. It worked.

Samples of Appert's preserved food were sent to sea with Napoleon's troops for a little over four months. Partridges, vegetables, and gravy were among 18 different items sealed in glass containers. All retained their freshness. "Not a single substance had undergone the least change at sea," Appert wrote of the trial. He was awarded the prize in 1810 by the Emperor himself. Like all good national heroes, Appert soon wrote a book called The Book of All Households: or The Art of Preserving Animal and Vegetable Substances for Many Years. It described in detail the process for canning more than 50 foods and was widely relied upon.

Later that year, an Englishman named Peter Durand was granted a patent from King George III for the idea of preserving food in "vessels of glass, pottery, tin or other metals or fit materials." Durand intended to surpass Appert and fashion containers out of tinplate. Made of iron coated with tin to prevent rusting and corrosion, tinplate could be sealed and made airtight but was not breakable like glass. A cylindrical canister and soldered lid would be much easier to handle than a fragile bottle with an unreliable cork.

Bryan Donkin and John Hall, used Durand's patent and, after more than a year of experimentation, set up the first commercial canning factory using tinplate cans in Bermondsey, England in 1812. If the French military was to travel farther and longer on their provisions, then the British needed to be able to do so as well. By 1813, Donkin's tins of preserved food were supplying the British army and navy. The Royal Navy used as many as 24,000 large cans—nearly 40,000 pounds—on its ships each year by 1818. The nutritious canned vegetables were a great relief to sailors who previously had relied on live cargo or salted meat and were often plagued by debilitating scurvy. It was believed that the salt caused the condition, when it was actually because the salt-cured foods lost most of their vitamins and nutrients in the preservation process.