Stephen Shankland/CNET

Twenty years ago, Netscape Communications was desperate. It was the darling of the first wave of internet companies for its ability to let you surf the web, but Microsoft had crushed its business prospects by giving away a web browser for free.

So Netscape did something that was radical for the time: On March 31, 1998, it gave away the source code behind its Netscape Communicator browser, the once-secret programming instructions that developers used to build the software. The project, called Mozilla, amounted to surrendering the crown jewels.

By the time the gamble paid off years later with the success of Mozilla's Firefox browser, Netscape was extinct. But even though the Mozilla project didn't rescue the internet pioneer, it did help profoundly reshape the technology industry.

When Mozilla was born, open-source software was a counterculture oddity that flew in the face of a software industry used to selling proprietary products. But today, it powers just about every tech company out there -- Google, Facebook and yes, even that old open-source nemesis, Microsoft. Mozilla wasn't the first open-source project, but it fanned the flames of a way of thinking that brought us ubiquitous social networks, mobile operating systems and thousands of apps.

"It was a Hail Mary pass," said Chris DiBona, director of open source at Google. "But somebody caught the ball and ran with it."

Now it's the norm. Google releases five or six open-source projects every single day -- more than 12,000 in total so far. It's common enough that Google automated the process so no humans are needed to review the decision. It's hard to overstate how profound a change that is for people who program for a living.

"For so long the mindset was 'protect the code, protect the code, protect the code,'" said Chris Tino, director of engineering at Ghostery, a privacy-focused browser extension maker that just released its software as open source. "Now it's almost to the point where if you're not open source, there's a little bit of a shadow cast over you."

Mozilla's sharp turn toward open source

In 1998, things were looking bad for Netscape. Its Communicator software, based on a web browser but also handling email and other online activities, was losing the first browser war. Microsoft's Internet Explorer was good and shipped free with Windows, the dominant operating system.

James Martin/CNET

"It was clear continuing to play on that field was lost," said Mitchell Baker, Mozilla chairwoman and early leader. The internal debate began: "How could we change the rules?" Open-source software was a commercial rarity at the time, but Netscape was a hot company whose developers were tapped into the new coding trends, and opening Netscape's source code turned out to be the answer to Microsoft's challenge.

Brendan Eich, another Mozilla co-founder and now chief executive of competitor Brave Software, saw the move as equally dramatic. "What do you do when you're being run into the wall by a monster truck? You make a hard left," he recounted.

Netscape's open-source move made headlines. But anyone expecting quick success was quickly disappointed. Many open-source projects begin their life in the open, but Mozilla began as an unwieldy mess no outsider could do much with.

"In the first six months, nothing was done with the browser code. It was a hairball," Eich said. "Besides expurgating ... curse words, we had to expurgate all the crypto code." The US government at the time banned US companies from exporting software -- including open-source software that could be downloaded -- that included encryption strong enough to be useful to protect e-commerce security.

Raising Firefox from Netscape's ashes

It was a long slog. The original browser project, called Mozilla, faltered and only recovered when stripped back to its essentials. The result, Firefox 1.0, arrived in 2004, when the Mozilla organization was down to just 14 employees, Baker said.

But what a difference it made. Microsoft, complacent with IE's victory over Netscape, had let its browser languish, and Firefox exploded in popularity with better performance, a better interface and viral word-of-mouth marketing.

Stephen Shankland/CNET

"Today it's probably hard to imagine how different that open-source community was," Baker said. "Open source was weird and crazy."

But it got the job done for Mozilla. Volunteers translated Firefox's interface into several languages. One added a key Firefox feature: tabs to easily let you handle many websites at once. Outsiders tested the software and provided crucial support to newcomers with questions, Baker said. They multiplied the strength of those 14 Mozilla employees immeasurably.

"Firefox could not have succeeded without open source," Baker said.

And now, largely as a result, we have a fiercely competitive browser market. Mozilla has struggled to maintain its influence, but the web itself remains a vital force, and that's one of Mozilla's key priorities. The organization's quest for a better internet, meanwhile, ranges from its stance on net neutrality to its responses to Facebook's data privacy scandal, including the release of an add-on to keep Facebook from tracking users and its decision to stop advertising on the social network. (Firefox add-ons include extensions, such as tools or features, and themes, which change the web browser's appearance.)

What exactly is open-source software?

Source code is software written in high-level programming languages that humans can understand. It's often a closely guarded secret.

The open-source software movement embraced the idea that a project could progress faster with source code that anyone could see, change and distribute on their own. Interested people or companies could modify it for their own needs -- "scratch your own itch" -- and the openness means there's more opportunity for people to spot bugs and offer solutions.

Early examples of open-source software -- and its philosophical progenitor, the free-software movement -- often began with no commercial ambitions at all. One of the most notable, the Linux core to a Unix-like operating system, began as a project by then-student Linus Torvalds.

But code shared freely on the internet flew in the face of tech titans, most notably Microsoft, which had risen to commercial success by selling licenses that granted customers the right to use software. Microsoft Windows and Office came on a shiny, silver CD sealed behind a legal agreement that forbade anyone from trying to figure out exactly how it worked.

Why Microsoft hated open-source software

Some open-source licenses require those who use a project to give back by open-sourcing any changes they make -- and maybe open-sourcing projects that use that open source, too. Stoking fears of that "viral" infection was central to Microsoft's campaign against open-source software. Former CEO Steve Ballmer called open-source software a "cancer," while Windows leader Jim Allchin said it was "an intellectual-property destroyer."

But Microsoft lost its battle, in part because of Mozilla's Firefox, said Joichi Ito, director of the MIT Media Lab and an advisory board member of the nonprofit Mozilla Foundation.

"It was a strategy to spread fear, uncertainty and doubt [FUD] because open source threatened Microsoft's business model. It was a rational plan," Ito said. "Eventually, Firefox would take down the monopoly that they had with Internet Explorer, and [Microsoft] would lose the server software market to Linux."

Stephen Shankland/CNET

There's plenty of proprietary software still in use, including at open-source powers like Google and Facebook. But Microsoft now sees things in a completely different light. It's got many open-source projects of its own, and it's acquired companies like Skype and LinkedIn that rely on it, said John Gossman, a Microsoft distinguished engineer.

"It's a great way to collaborate with people," he said. When Microsoft CEO Satya Nadella and Scott Guthrie, head of the company's Azure cloud service, "are pushing from the top and we're pushing from the bottom, the cultural change is pretty fast," he said.

Business as usual

Open source is now mainstream, an immense pool of technology that's there for the taking. It lets startups concentrate on what's new instead of reinventing the wheel. It lets established companies lower operational costs. Programmers use the open-source collaboration site Github to show what they've done and to link socially.

"For many people their resume is their Github," Gossman said.

The result: a faster-moving industry.

"With open-source software, you're able to get up and running much faster," and without needing as much money, said Christine Abernathy, developer advocate for Facebook's open-source team. "As different people use it, you get different perspectives that help the whole ecosystem grow faster."

Reactjs.org

Facebook has seen it firsthand. One of its projects, React, is now widely used to build websites, and another, React Native, is equally popular among programmers building apps for smartphones powered by Google's Android and Apple's iOS operating systems. On Github, more than 90,000 people follow the React project.

And gone are the days when one company would have to jump through months of legal hoops to arrange a collaboration, said Gordon Haff, who saw the open-source transition firsthand as he moved from now-defunct Unix computer maker Data General to Linux and open-source software supplier Red Hat.

"If all partnerships had to get legal contracts -- there aren't enough intellectual property lawyers in the country to execute all those contracts," Haff said. "That may be the biggest surprise that has come out of open source."

The future of open source

Software is famously easy to change, but the open-source ethos is spreading farther. Some examples:

And Mozilla helped make it all happen.

"The idea of people working together for the common good in some homegrown governance structure and sharing the results -- that has become deeply mainstream," Baker said. "Open source has become mainstream."

Blockchain Decoded: CNET looks at the tech powering bitcoin -- and soon, too, a myriad of services that will change your life.

'Alexa, be more human': Inside Amazon's effort to make its voice assistant smarter, chattier and more like you.