Berdan primers are named after their American inventor, Hiram Berdan of New York who invented his first variation of the Berdan primer and patented it on March 20, 1866, in U.S. Patent 53,388. A small copper cylinder formed the shell of the cartridge, and the primer cap was pressed into a recess in the outside of the closed end of the cartridge opposite the bullet. In the end of the cartridge beneath the primer cap was a small vent-hole, as well as a small teat-like projection or point (later to be known as an anvil) fashioned from the case, such that the firing pin could crush the primer against the anvil and ignite the propellant. This system worked well, allowing the option of installing a cap just before use of the propellant-loaded cartridge as well as permitting reloading the cartridge for reuse. Difficulties arose in practice because pressing in the cap from the outside tended to cause a swelling of the copper cartridge shell, preventing reliable seating of the cartridge in the chamber of the firearm. Berdan's solution was to change to brass shells, and to further modify the process of installing the primer cap into the cartridge, as noted in his second Berdan Primer patent of September 29, 1869, in U.S. Patent 82,587. Berdan primers have remained essentially the same functionally to the present day.
Berdan primers are similar to the caps used in the caplock system, being small metal cups with pressure-sensitive explosive in them. Modern Berdan primers are pressed into the "primer pocket" of a Berdan-type cartridge case, where they fit slightly below flush with the base of the case. Inside the primer pocket is a small bump, the "anvil", that rests against the center of the cup, and two small holes (one on either side of the anvil) that allow flash from the primer to reach the interior of the case. Berdan cases are reusable, although the process is rather involved. The used primer must be removed, usually by hydraulic pressure or a pincer or lever that pulls the primer out of the bottom. A new primer is carefully seated against the anvil, and then gunpowder and a bullet are added. Because the Berdan primer is difficult to remove from the case without damaging the anvil, Berdan priming is used by nearly all militaries and most civilian manufacturers (with the exception of those in the United States) to discourage reloading of ammunition.
 Boxer primers
Meanwhile, Edward M. Boxer, of the Royal Arsenal, Woolwich, England was working on a similar primer cap design for cartridges, patenting it in England on October 13, 1866, and subsequently received a U.S. patent for his design on June 29, 1869, in U.S. Patent 91,818.
Boxer primers are similar to Berdan primers with one major change, the location of the anvil. In a Boxer primer, the anvil is a separate piece that sits in the primer cup. The primer pocket has a single larger flash-hole in its center. This positioning makes little or no difference to the performance of the round, but it makes fired primers vastly easier to remove for re-loading; the primer assembly is removed by pushing a thin metal rod through the flash hole, which is centered in the case. A new primer, anvil included, is then pressed into the case. Since the primer and anvil are sold as one part, the anvil depth must be correct for the primer that is being inserted so that the primer does not ignite during loading (although priming is done as the first step, before the powder is added.) Boxer priming is universal in the USA, and contributes to the large number of shooters who reload their ammunition.
Boxer-primed ammunition is slightly more complex to manufacture, since the primer is in two parts, but automated machinery producing primers by the hundreds of millions has eliminated that as a practical problem and while the primer is more complex to make, the cartridge case is simpler. For users who reload their brass, the slight increase in initial cost is more than equalized by the decreased cost of firing reloaded rounds (reloading ammunition can save as much as 85-90% compared with new factory rounds.) However, because of the slightly lower cost of manufacture Berdan priming is found to be much more common in military-surplus ammunition made outside the United States. Military-surplus Berdan-primed ammunition also often uses corrosive or slightly-corrosive priming compounds because they are slightly cheaper to use, whereas Boxer-primed ammunition now is almost always noncorrosive and non-mercury-containing. These corrosive priming mixtures can cause serious damage to the gun unless the barrel and action are cleaned carefully after firing. Assuming corrosive or noncorrosive characteristics based on the primer type is never foolproof, however, and much older U.S. military ammunition used corrosive primers. The two primer types are almost impossible to distinguish by looking at the loaded cartridge, though the two flash-holes can be seen inside a fired Berdan case and the larger single hole seen or felt inside a fired Boxer case. Berdan and Boxer cartridges are both considered "centerfire" and are interchangeable; the same weapon can fire either Berdan- or Boxer-primed rounds if the cartridge dimensions are the same.
 Primer sizes
Primers come in different sizes, based on the application. The types/sizes of primers are:
For both pistol and rifle: Small (.175" diameter) and Large (.210"), often in Standard and Magnum versions.
.209 primers for shotgun shells and modern inline muzzleloaders, using a Boxer-type primer factory-assembled inside a tapered, flanged brass cup.
.50 BMG primers, used for the .50 Browning Machine Gun cartridge and derivatives
Specialty primers for extremely small centerfire cases, or for large cannon cartridges
Examples of uses:
.38 Special, small pistol standard
.357 Magnum, small pistol magnum
.45 ACP, large pistol standard
.223 Remington, small rifle standard
.308 Winchester, large rifle standard
.270 WSM, large rifle magnum
The primer size is based on the primer pocket of the cartridge, with standard types available in large or small diameters. The primer's explosive charge is based on the amount of ignition energy required by the cartridge design; a standard primer would be used for smaller charges or faster-burning powders, while a magnum primer would be used for the larger charges or slower-burning powders used with large cartridges or heavy charges. Rifle, large and magnum primers increase the ignition energy delivered to the powder, by supplying a hotter, stronger and/or longer-lasting flame. Pistol cartridges often are smaller than modern rifle cartridges, so they may need less primer flame than rifles require. A physical difference between pistol and rifle primers is the thickness of the primer's case; since pistol cartridges usually operate at lower pressure levels than rifles, their primer cups are thinner, softer, and easier to ignite, while rifle primers are thicker and stronger, requiring a harder impact from the firing pin. (Despite the names pistol and rifle, the primer used depends on the cartridge, not the firearm; a few high-pressure pistol cartridges like the .221 Fireball and .454 Casull use rifle primers, while lower-pressure pistol and revolver cartridges like the 32 and 380 Autos, 9mm Luger, 38 Special, 357 Magnum, 44 Magnum and 45 ACP and traditional revolver cartridges like 32-20, 44-40 and 45 Colt, also used in lever action rifles, still would be loaded with pistol primers. Virtually all cartridges used solely in rifles do, however, use rifle primers.)