Thirty years ago, Tim Berners-Lee, then a fellow at the physics research laboratory Cern on the French-Swiss border, sent his boss a document labelled Information Management: A Proposal. The memo suggested a system with which physicists at the centre could share “general information about accelerators and experiments”.

“Many of the discussions of the future at Cern and the LHC era end with the question: ‘Yes, but how will we ever keep track of such a large project?’” wrote Berners-Lee. “This proposal provides an answer to such questions.”

His solution was a system called, initially, Mesh. It would combine a nascent field of technology called hypertext that allowed for human-readable documents to be linked together, with a distributed architecture that would see those documents stored on multiple servers, controlled by different people, and interconnected.

The Guardian view on the world wide web: we wove a tangle | Editorial

Read more

It didn’t really go anywhere. Berners-Lee’s boss, Mike Sendall, took the memo and jotted down a note on top: “Vague but exciting …” But that was it. It took another year, until 1990, for Berners-Lee to start actually writing code. In that time, the project had taken on a new name. Berners-Lee now called it the World Wide Web.

Thirty years on, and Berners-Lee’s invention has more than justified the lofty goals implied by its name. But with that scale has come a host of troubles, ones that he could never have predicted when he was building a system for sharing data about physics experiments.

Some are simple enough. “Every time I hear that somebody has managed to acquire the [domain] name of their new enterprise for $50,000 (£38,500) instead of $500, I sigh, and feel that money’s not going to a good cause,” Berners-Lee tells me when we speak on the eve of the anniversary.

Berners-Lee demonstrating the world wide web to delegates at the Hypertext 1991 conference in San Antonio, Texas. Photograph: 1994-2017 CERN

It is a minor regret, but one he has had for years about the way he decided to “bootstrap” the web up to something that could handle a lot of users very quickly: by building on the pre-existing service for assigning internet addresses, the domain name system (DNS), he gave up the chance to build something better. “You wanted a name for your website, you’d go and ask [American computer scientist] Jon Postel, you know, back in the day, and he would give you a name.

“At the time that seemed like a good idea, but it relied on it being managed benevolently.” Today, that benevolent management is no longer something that can be assumed. “There are plenty of domain names to go around, but the way people have invested, in buying up domains that they think entrepreneurs or organisations will use – even trying to build AI that would guess what names people will want for their organisations, grabbing the domain name and then selling it to them for a ridiculous amount of money – that’s a breakage.”

It sounds minor, but the problems with DNS can stand in for a whole host of difficulties the web has faced as it has grown. A quick fix, built to let something scale up rapidly, that turns out to provide perverse incentives once it is used by millions of people and is so embedded that it is nearly impossible to change course.

But nearly impossible is not actually impossible. That is the thrust of the message Berners-Lee is aiming to spread. Every year, on the anniversary of his creation, he publishes an open letter on his vision for the future of the web. This year’s letter, given the importance of the anniversary, is broader in scope than most – and expresses a rare level of concern about the direction in which the web is moving.

“While the web has created opportunity, given marginalised groups a voice and made our daily lives easier,” he writes, “it has also created opportunity for scammers, given a voice to those who spread hatred and made all kinds of crime easier to commit.

“It’s understandable that many people feel afraid and unsure if the web is really a force for good. But given how much the web has changed in the past 30 years, it would be defeatist and unimaginative to assume that the web as we know it can’t be changed for the better in the next 30. If we give up on building a better web now, then the web will not have failed us. We will have failed the web.”

Berners-Lee breaks down the problems the web now faces into three categories. The first is what occupies most of the column inches in the press, but is the least intrinsic to the technology itself: “deliberate, malicious intent, such as state-sponsored hacking and attacks, criminal behaviour and online harassment”.

He believes this makes the system fragile. “It’s amazing how clever people can be, but when you build a new system it is very, very hard to imagine the ways in which it can be attacked.”

At the same time, while criminal intentions may be the scariest for many, they aren’t new to the web. They are “impossible to eradicate completely”, he writes, but can be controlled with “both laws and code to minimise this behaviour, just as we have always done offline”.

More concerning are the other two sources of dysfunction affecting the web. The second is when a system built on top of Berners-Lee’s creation introduces “perverse incentives” that encourage others to sacrifice users’ interests, “such as ad-based revenue models that commercially reward clickbait and the viral spread of misinformation”. And the third is more diffuse still: those systems and services that, thoughtfully and benevolently created, still result in negative outcomes, “such as the outraged and polarised tone and quality of online discourse”.

The problem is that it is hard to tell what the outcomes of a system you build are going to be. “Given there are more webpages than there are neurons in your brain, it’s a complicated thing. You build Reddit, and people on it behave in a particular way. For a while they all behave in a very positive, constructive way. And then you find a subreddit in which they behave in a nasty way.

“Or, for example, when you build a system such as Twitter, it becomes wildly, wildly effective. And when the ‘Arab Spring’ – I will never say that without the quotes – happens, you’re tempted to claim that Twitter is a great force for good because it allowed people to react against the oppressive regime.

“But then pretty soon people are contacting you about cyberbullying and saying their lives are miserable on Twitter because of the way that works. And then another few iterations of the Earth going around the sun, and you find that the oppressive regimes are using social networks in order to spy on and crack down on dissidents before the dissidents could even get round to organising.”

In conclusion, he says, “You can’t generalise. You can’t say, you know, social networks tend to be bad, tend to be nasty.”

For a creation entering its fourth decade, we still know remarkably little about how the web works. The technical details, sure: they are all laid out there, in that initial document presented to Cern, and in the many updates that Berners-Lee, and the World Wide Web Consortium he founded to succeed him, have approved.

But the social dynamics built on top of that technical underpinning are changing so rapidly and are so unstable that every year we need to reassess its legacy. “Are we now in a stable position where we can look back and decide this is the legacy of the web? Nooooope,” he says, with a chuckle. Which means we are running a never-ending race, trying to work out the effects of new platforms and systems even as competitors launch their eventual replacements.

Berners-Lee’s solution is radical: a sort of refoundation of the web, creating a fresh set of rules, both legal and technical, to unite the world behind a process that can avoid some of the missteps of the past 30 years.

Calling it the “contract for the web”, he first suggested it last November at the Web Summit in Lisbon. “At pivotal moments,” he says, “generations before us have stepped up to work together for a better future. With the Universal Declaration of Human Rights, diverse groups of people have been able to agree on essential principles. With the Law of Sea and the Outer Space Treaty, we have preserved new frontiers for the common good. Now too, as the web reshapes our world, we have a responsibility to make sure it is recognised as a human right and built for the public good.”

This is a push for legislation, yes. “Governments must translate laws and regulations for the digital age. They must ensure markets remain competitive, innovative and open. And they have a responsibility to protect people’s rights and freedoms online.”

But it is equally important, he says, for companies to join in and for the big tech firms to do more to ensure their pursuit of short-term profit is not at the expense of human rights, democracy, scientific fact or public safety. “This year, we’ve seen a number of tech employees stand up and demand better business practices. We need to encourage that spirit.”

But even if we could fix the web, might it be too late for that to fix the world? Berners-Lee’s invention has waxed and waned in its role in the wider digital society. For years, the web was the internet, with only a tiny portion of hardcore nerds doing anything online that wasn’t mediated through a webpage.

But in the past decade, that trend has reversed: the rise of the app economy fundamentally bypasses the web, and all the principles associated with it, of openness, interoperability and ease of access. In theory, any webpage should be accessible from any device with a web browser, be that an iPhone, a Windows PC or an internet-enabled fridge. The same is not true for content and services locked inside apps, where the distributor has absolute power over where and how users can interact with their platforms.

In fact, the day before I speak to Berners-Lee, Facebook boss Mark Zuckerberg published his own letter on the future of the internet, describing his goal of reshaping Facebook into a “privacy-focused social network”. It had a radically different set of aims: pulling users into a fundamentally closed network, where not only can you only get in touch with Facebook users from other Facebook products, but even the very idea of accessing core swathes of Facebook’s platform from a web browser was deprioritised, in favour of the extreme privacy provided by universal end-to-end encryption.

For Berners-Lee, these shifts are concerning, but represent the strengths as well as the weaknesses of his creation. “The crucial thing is the URL. The crucial thing is that you can link to anything.

This is for Everyone seen during the opening ceremony of the London Olympics in 2012, a nod to Berners-Lee’s creation. Photograph: Martin Rickett/PA

“The web platform [the bundle of technologies that underpin the web] is always, at every moment, getting more and more powerful. The good news is that because the web platform is so powerful, a lot of the apps which are actually built, are built using the web platform and then cranked out using the various frameworks which allow you to generate an app or something from it.” All the installable applications that run on smartphones and tablets work in this way, with the app acting as little more than a wrapper for a web page.

“So there’s web technology inside, but what we’re saying is if, from the user’s point of view, there’s no URL, then we’ve lost.”

In some cases, that battle really has been lost. Apple runs an entire media operation inside its app store that can’t be read in normal browsers, and has a news app that spits out links that do not open if Apple News has been uninstalled.

But in many more, the same viral mechanics that allow platforms to grow to a scale that allow them to consider breaking from the web ultimately keep them tied to the openness that the platform embodies. Facebook posts still have permanent links buried in the system, as do tweets and Instagrams. Even the hot new thing, viral video app TikTok, lets users send URLs to each other: how else to encourage new users to hop on board?

It may be too glib to say, as the early Netscape executive Ram Shriram once did, that “open always wins out” – tech is littered with examples where a closed technology was the ultimate victor – but the web’s greatest strength over the past 30 years has always been the ability of anyone to build anything on top of it, without needing permission from Berners-Lee or anyone else.

But for that freedom to stick around for another 30 years – long enough to get the 50% of the world that isn’t online connected, long enough to see the next generation of startups grow to maturity – it requires others to join Berners-Lee in the fight. “The web is for everyone,” he says, “and collectively we hold the power to change it. It won’t be easy. But if we dream a little and work a lot, we can get the web we want.”