NEW YORK -- The shootings of a dozen people in an ambush on Dallas police officers Thursday night came amid an increase in online threats to police and a rise in surprise attacks on cops, experts tell CBS News.

Law enforcement monitoring of social media noted an increase in threats to police online in the days since Baton Rouge, Louisiana police were filmed shooting and killing Alton Sterling during a Tuesday morning confrontation. Those threats peaked Thursday night after the ambush on Dallas police guarding a peaceful protest. Micah Xavier Johnson, 25, was killed by police early Friday after killing five and injuring seven.

Experts who track attacks on police say threats and ambushes are on the rise. There have been 11 shooting ambushes on law enforcement so far this year, according to the National Law Enforcement Memorial Fund, which monitors such attacks. That number is up from eight in 2015, and on pace to pass the 15 attacks that occurred the year before.

"We're on a record-setting pace of the worst kind," said Craig Floyd, president and CEO of the fund. "There's still so much anti-cop and anti-government mentality in this country, and who is the most vulnerable? It's the cops on the street."

Get Breaking News Delivered to Your Inbox

Floyd said the attacks call to mind a particularly dark time in the history of policing: the 1970s, when surprise attacks on cops last peaked.

"It was certainly the most dangerous time for police. Many of the officers who were killed were just targeted and assassinated. Many of them were ambushes," Floyd said. Experts said ambushes largely dropped off the radar until recent high-profile attacks on police, including the 2014 killings of New York officers Wenjian Liu and Rafael Ramos and the killings of four California officers in 2013 by Christopher Dorner.

Floyd blames the spread of anti-government and anti-police messages on social media. It's a sentiment backed up by Dallas Police Chief David Brown, who said during a news conference that police don't feel supported by their communities.

"Please join me in applauding these brave men and women who do this job under great scrutiny, under great vulnerability. Who literally risk their lives to protect our democracy," Brown said. "We don't feel much support most days. Let's not make today most days. Please, we need your support to be able to protect you from men like these who carried out this tragic, tragic event."

Although investigators noted the uptick in anti-police sentiment online, Maria Haberfeld, a professor at the John Jay College of Criminal Justice who specializes in police training and tactics, said online threats don't necessarily mean real-world violence.

"There's a huge difference between somebody sending a threat and somebody actually shooting a police officer," Haberfeld said.

While threatening to kill police officers is illegal, merely expressing anti-police sentiment without making a specific threat is not illegal. And policing everything said on the Internet would be a Herculean task, Haberfeld said.

"There's a tsunami of information out there," she said.

But experts told CBS News on Friday that the situation in Dallas was emblematic of a quandary facing policing. Despite the general increase in threats against police, video of the moments when shots first rang out reveals that few of the officers -- who were guarding a peaceful protest of the police shooting deaths of Sterling, and Philando Castile in Falcon Heights, Minnesota -- were wearing body armor or Kevlar helmets.

Experts said concern over optics means police don't always wear the protection they might need to survive ambushes. They pointed to widespread public criticism in 2014 after police in Ferguson, Missouri rode in armored vehicles and wore body armor during protests over the police killing of Michael Brown.

"We want them to look friendly, we want them to act friendly, and we don't want them to hurt anybody," Floyd said.