In early black powder guns such as muzzleloaders, the primer was essentially the same chemical as the main propellant (albeit usually in a finer-powdered form), but poured into an external flash pan, where it could be ignited by an ignition source such as a slow match or a flintlock, though some muzzleloaders have primers like cap gun caps.
As gunpowder will not burn when wet, this made it difficult (or even impossible) to fire these types of weapons in rainy or humid conditions.
Due to their small size, these primers themselves lack the power to shoot the projectile, but still have enough energy to drive a bullet partway into the barrel — a dangerous condition called a squib load.
The match was a slow-burning fuse made of plant fibers that were soaked in a solution of nitrates, charcoal, and sulfur, and dried.
With careful attention, the slow-burning match could be kept burning for long periods of time, and the use of the lock mechanism made fairly accurate fire possible.
The wheel-lock was a major innovation — since it did not rely on burning material as a source of heat, it could be kept ready for extended periods of time.
Wind, rain, and wet weather would render a matchlock useless, but a wheel-lock that was loaded and waterproofed with a bit of grease around the flashpan could be fired under most conditions.
The flintlock mechanism was simpler and stronger than the wheel-lock, and the flint and steel provided a good, reliable source of ignition.
The main reason the caplock was so quickly adopted was its similarity to the flintlock and the ease of converting older arms to use percussion-cap ignition; usually, the same lock and barrel could be used with minor changes.
The flashpan and frizzen were removed and replaced by a small, hollow horizontal cylinder (drum) screwed into the bored-out and tapped flash hole and carrying a "nipple" over which the cap could be fitted.
The percussion cap was a thin metal cup that contained a small quantity of pressure-sensitive explosive, often mercury fulminate.
When crushed, the explosive would detonate, sending a stream of hot gas down through a hole in the nipple and into the touchhole of the gun to ignite the powder charge.
In the process of firing, the cap generally split open and would fall off when the hammer was moved to the half-cock position for loading.
A small number of caseless cartridges use no primer at all, but the primary propellant is ignited using an externally provided electric charge, such as with the Voere VEC-91 and the O'Dwyer VLe.
Chemical primers, advanced metallurgy and manufacturing techniques all came together in the 19th century to create an entirely new class of firearm — the cartridge arm.
While a flintlock, for example, is immediately ready to be reloaded once it has been fired, adopting brass cartridge cases brought in the problems of extraction and ejection.
The mechanism of a modern gun not only must load and fire the piece, but also must remove the spent case, which may require just as many moving parts.
Nineteenth-century inventors were reluctant to accept this added complication and experimented with a variety of self-consuming cartridges before acknowledging that the advantages of brass cases far outweighed their one drawback.
Moreover, the pin had to be positioned carefully in a small notch when loading, making the pinfire's use in repeating or self-loading weapons impossible.
The .22 Long Rifle, also fired in pistols, is the most popular recreational caliber today because it is inexpensive, relatively quiet, and has very low recoil.
[1] The identifying feature of centerfire ammunition is the metal cup containing the primer inserted into a recess in the center of the base of the cartridge.
The firearm firing pin crushes this explosive between the cup and an anvil to produce hot gas and a shower of incandescent particles to ignite the powder charge.
Cartridges for military use require stable priming formulations, so war reserves of small-arms ammunition will dependably function after years of storage.
Among the advantages this brings is the ability, in an automatic weapon, to control the moment of cartridge ignition partially independently of the mechanical action of the gun.
Other countries such as the Soviet Union relied on cruder mechanical systems, which reduced the rate of fire of their guns more severely.