There's a battle raging over the Internet right now — one that pits a multibillion-dollar industry against a few lines of code.

On the surface, the sticking point is whether or not people should have to look at the pop-ups, banners, autoplay videos and the other attention-grabbing ploys that subsidize most free websites. The tools that enable them not to do so are easier than ever to use.

But at stake, those who make their livelihood on the web warn, is the future of the Internet as we know it.

Once the province of a small, dedicated core of code-savvy web surfers, ad-blocking software is enjoying more mainstream popularity thanks to simplified installation processes, security concerns and growing unease over mass personal data collection.

The number of people who use ad-blocking software worldwide has ballooned by 41% to nearly 200 million in the past year, according to a report released this week by Adobe and PageFair, an Ireland-based startup that helps companies combat ad-blockers.

That's a small fraction of the nearly 3 billion people estimated to use the Internet worldwide but enough to evaporate an almost $22 billion chunk of total online ads revenue this year, the report says.

The United States saw a 48% spike in the past year to a total of 45 million ad-block users, the report said. In some European countries, where ad-blockers are more widespread, more than a third of Internet users have installed them.

AdBlock is Losing Publishers Billions of Dollars http://t.co/BoaGUB5xml pic.twitter.com/qTCYd7OQkF — n3rdabl3 (@n3rdabl3) August 10, 2015

A growing threat

Advertising dollars are the lifeblood of the free Internet, fueling every site from social media titans to scrappy blogs.

Some web publishers and advertisers are haranguing ad-blocking programs over this fact and even going so far as to accuse their users of stealing content.

But many ad-block users counter that websites brought this on themselves by flooding the Internet for years with obnoxious, and sometimes malicious ads with no regard for the toll it takes on loading speeds or screen clutter. The dozens of hidden trackers and cookies built in to most ad-supported websites only further justifies the need for blocking in their eyes.

It may be something of a vicious circle: Publishers are especially vulnerable to the threat of blocked ads because they are still grappling with how to make meaningful money from slippery online ads — even when they do shower them on readers. The cold reality is that readers tend to ignore most types of ads even without blockers.

To make matters worse, people are increasingly spending their time online on their smartphones, where ads are even less lucrative.

The New York Times, for example, gets as many as 60 million visitors to its website each month, about one million of whom pay for a subscription. Only about 625,000 people still pay for the daily paper.

Yet print accounts for a lopsided 70% of the paper's total revenue. And half of digital traffic comes through mobile, but it only accounts for 10% of its online ads revenue.

Digital ad spend to surpass TV spend in 2016! Learn more ads insights: http://t.co/44xKDmQ6dO pic.twitter.com/9FbVCgactY — Marketing Cloud (@marketingcloud) August 12, 2015

With Apple set to usher ad-blockers onto mobile Safari browsers and Google losing its fight to keep them off of Android, mobile ad-blockers are expected to soon be commonplace.

Part of the profit struggle has to do with an overload of clunky, low-grade ads — especially on mobile, where the learning curve is still steep — and the difficulty of gauging whether people pay attention to them.

"The onus will be on advertisers to elevate how they look at digital advertising," says Elizabeth Kalmbach, vice president and group media director at ad agency Kelly Scott Madison.

Advertisers have already made strides in that direction, she said. More personalization, improved techniques for measuring engagement and native ads that blend in with editorial content are all promising bright spots.

But they are still losing a race against the clock, says Ben Barokas, CEO and co-founder of Sourcepoint, a startup aimed at fending off ad-blockers.

"We're beyond the threat stage," Barokas said. "There is large impact that are occurring — billions of dollars a year — and it will get much, much worse before it gets better."

It's a lopsided match-up that lays bare the shaky ground that some online companies have built their business on: A massive industry pumped with billions of dollars at the mercy of a handful of startups with some run-of-the-mill Java script code.

Blocking the blockers

Barokas and a few other serial entrepreneurs have teamed up in a bid to beat ad-blockers at their own game.

"It's like one little pirate holding the royal navy hostage," said Matt Adkisson, another Sourcepoint co-founder.

Their company just raised $10 million in investor funding to make software that essentially blocks ad-blockers. As of now, Sourcepoint's software is offered to publishers for free until the company figures out how it will charge them.

The service will eventually give publishers a few different options: it can bypass the ad-blocker and show the ad anyway, display a message reminding the visitor that the site loses money when ads are blocked, offer a subscription plan or let readers choose ads that are more to their liking.

It may sound naive to assume that ad-block users will make an exception for a publisher that appeals to their empathy, but Adkisson claims that a lot of people aren't aware of the plight publishers are facing. Many people have ad-blockers installed automatically along with security software packages or don't realize they are hurting the sites they visit, he said.

Barokas, a longtime veteran of the ad tech industry, previously founded a display advertising called Admeld that was later acquired by Google. He left his job at Google to found Sourcepoint after noticing the growing number of publishers clamoring for an ad blocking solution.

"Publisher after publisher after publisher approached me and said, 'Please fix our ad block problem," Barokas said.

Sourcepoint's founders don't think much of the business models behind the ad-block industry. Adkisson calls AdBlock Plus—one of the biggest ad blocking services on the market — an "extortion" scheme because it makes allowances for ads of companies that pay to be on its wide-ranging whitelist.

The Guardian displays a message to readers with ad-blockers switched on. Image: screenshot

Sourcepoint isn't the first to propose this type of counter-attack. Piercing through ad-blocking walls is relatively easy, and there is similar software already on the market. PageFair, for one, aims to recoup advertiser revenue by displaying non-intrusive, ad-block-friendly ads.

Besides a sizable venture capital investment and the backing of seasoned ad tech veterans, Adkisson hopes the startup will stand out by recognizing that a brute force approach is at best a band-aid solution to make way for an eventual improvement in ad quality.

"What we are trying to do is not just beat the ad-blockers and say, 'Ha ha ha now you're seeing ads,'" Adkisson said. "What we have a really cool opportunity to do is to use the who dilemma of ad-block to evolve the web into a much better place where users have more control over the advertising experience."

When asked about whether fledgling business has been received well, Adkisson would only say that Sourcepoint has "dozens of premium publishers" on board.

Is it ethical? There's an app for that

Publishers have occasionally thrown around an accusation that readers who visit sites ad-free are stealing the content they view.

"Every time you block an ad, what you're really blocking is food from entering a child's mouth," Tom’s Guide editorial director Avram Piltch wrote in May.

But Irina Raicu, Internet ethics program director at Santa Clara University, said publishers should do some soul-searching of their own before leveling such a charge.

In terms of spreading the most possible good — or as the philosopher John Stuart Mill would say, utility — ad-blockers are ethical because they can benefit the Internet at large with a smoother web experience as opposed to a select group of publishers that reap the profits of ads.

On top of that, many ads are actually in questionable ethical territory because they harass users and in some cases—such as a recent high-profile incident involving Yahoo — infect computers with malware.

"If this continues, maybe at some point we will all end up having an ethical obligation to install ad-blockers," Raicu said.

Of course, there are arguments to be made about the magnitude of the harm to each party, and no one would be much better off if ad-blockers choked out an industry, so there are shades of nuance and different schools of thought to consider.

That's why Raicu's department, the Markkula Center for Applied Ethics, has created a smartphone app that lets users evaluate their decisions online through what Raicu refers to as "Instagram filters" of different ethical philosophies.

But the true implications down the road are hard to predict. Kelly Scott Madison's Kalmbach said there's a chance that panic over ad-blockers is overwrought, much like when the television industry worried that DVR commercial-skipping could be its undoing.

On the other hand, Adkisson pictures a scenario in which a flailing ad industry starves all but the biggest publishers and advertisers, who are then forced to make deals for protection with the tech giants who maintain "walled gardens."

"Whereas today there's an immense amount of wild, wild west of content creation, sharing and consumption," he says. "If you kill the ads on the web, you will drive all of that back into the only place that can afford to run it, which are these giant walled gardens."