Booming online retail sales are good news for the US Postal Service, but its carriers are incurring a cost: more dog bites.

Dog attacks on postal workers rose last year to 6,755, up 206 from the previous year and the highest in three decades, as internet shopping booms and consumers increasingly demand seven-day-a-week package delivery and groceries dropped at their doorstep. The high for attacks dated back to the 1980s, at more than 7,000, before maulings by pit bulls and other potentially aggressive dogs became a public issue.

Los Angeles topped the 2016 list with 80 attacks on postal workers, followed by Houston with 62 and Cleveland with 60.

The Postal Service released its annual figures Thursday as part of National Dog Bite Prevention Week, which begins Sunday.

A longtime cliche of movies, dog biting of mail carriers — or at least dog chasing — is no laughing matter for the post office. Medical expenses and workers' compensation cost the Postal Service millions of dollars each year.

Overall, an estimated 4.5 million Americans are bitten by dogs annually, mostly children. In the last year, dog attacks on carriers rose 3 percent. Still, while dog bite claims are rising, there are signs attacks may be less severe: The average cost per claim fell last year by more than 10 percent to $33,230, according to the Insurance Information Institute and State Farm.

“It's always on your mind as a carrier, 'Is there a dog in the area and is it a threat?”' said James Solomon, a 17-year postal carrier. Officially, 2 percent of carriers were bitten last year, but Solomon says every carrier he knows has some kind of “dog experience” to tell, from outrunning to cajoling a territorial pet.

The post office hopes more public awareness will help.

After a 14 percent jump in dog attacks in 2015, the post office launched a “Trip Hazards” app on handheld devices to help warn carriers of potentially hostile dogs. Customers are asked on package pickup applications if there are dogs at their addresses. In extreme cases, residents will be told to pick up mail at a post office until a repeat offender dog is restrained.

“Even good dogs have bad days,” said US Postal Service Safety Director Linda DeCarlo in Los Angeles. “Dog bite prevention training and continuing education are important to keep pet owners, pets and those who visit homes — like letter carriers — happy and healthy.”

She urges owners to secure their dogs in a separate room before opening the door and to remind family members not to take mail directly from letter carriers in front of their dog, which may view it as a threatening gesture.

Rising dog attacks come amid double-digit increases in the post office's package business. While US population growth means more residences to deliver to, postal carriers are also visiting homes more frequently and at all times of day, with packages or groceries in hand, thanks to agreements struck with Amazon in 2013 and 2014.

United Parcel Service said its 66,000 deliverers suffered about 900 dog bites last year, a percentage that has remained fairly stable. Spokesman Dan McMackin, a former UPS driver who used to carry dog biscuits to woo surly pets, said he found pit bulls and smaller dog breeds to be more nettlesome than “hunting dogs” — such as Labrador retrievers and beagles — who “don't have much to prove.”

FedEx Corp. said it does not collect numbers on dog attacks.

Solomon, who lives in Hatboro, Pennsylvania, said he thought he had learned all the tricks to prevent attacks: watch the dog's mannerisms, use the mail satchel as a shield, or pull out the emergency dog spray if needed — it contains an extract of cayenne pepper.

But last week, those safeguards weren't enough when a woman answered his knock.

The A-Z of dog breeds Show all 26 1 /26 The A-Z of dog breeds The A-Z of dog breeds Airedale Terrier Rob Clarke The A-Z of dog breeds Border Collie Rob Clarke The A-Z of dog breeds Corgi Rob Clarke The A-Z of dog breeds Dalmatian Rob Clarke The A-Z of dog breeds English Setter Rob Clarke The A-Z of dog breeds Fox Terrier Rob Clarke The A-Z of dog breeds Great Dane Rob Clarke The A-Z of dog breeds Harrier Rob Clarke The A-Z of dog breeds Irish Wolfhound Rob Clarke The A-Z of dog breeds Jack Russell Rob Clarke The A-Z of dog breeds Kerry Blue Terrier Rob Clarke The A-Z of dog breeds Lurcher Rob Clarke The A-Z of dog breeds English Mastiff Rob Clarke The A-Z of dog breeds Norwich Terrier Rob Clarke The A-Z of dog breeds Old English Sheepdog Rob Clarke The A-Z of dog breeds Pointer Rob Clarke The A-Z of dog breeds Queen Elizabeth Pocket Beagle Rob Clarke The A-Z of dog breeds Rottweiler Rob Clarke The A-Z of dog breeds Staffordshire Bull Terrier Rob Clarke The A-Z of dog breeds Toy Poodle Rob Clarke The A-Z of dog breeds Unknown (Mongrel) Rob Clarke The A-Z of dog breeds Victorian Bulldog Rob Clarke The A-Z of dog breeds West Highland Terrier Rob Clarke The A-Z of dog breeds Xolo Rob Clarke The A-Z of dog breeds Yorkshire Terrier Rob Clarke The A-Z of dog breeds Zuchon Rob Clarke

“It was three little hot dogs who came out and bit me on the shin,” Solomon said, describing dachshunds. “It didn't hurt that much, but it was very aggressive, one after the other.”

Robert Lieb, a professor of supply chain management at Northeastern University, said he expects dog attacks to keep increasing. Still, the online industry continues to change, and dogs may prove to be less of a problem if Amazon changes its delivery to a new method: drones.

“The question is whether drones will land or parachute the packages down,” said Lieb, a former shipping consultant. “I would see eagles, not dogs, taking out drones.”