There you are, happily following some twisting, turning path through the web when you are brought suddenly to a halt by a broken link. Many websites will tersely tell you "404 Not Found" and leave you to it.
Others will try to soften the blow by announcing their failure in a friendly way, though even many of these still display the mysterious 404. What does it mean?
To find out, we have to probe a little into the hypertext transfer protocol, otherwise known as HTTP. That's the bit that appears at the start of virtually all web addresses - or used to until its ubiquity caused it to fade into the background. It doesn't usually even appear in the web browser address bar any more. Whether displayed or not, though, it is crucial to the world wide web, because it defines how information is exchanged between web browsers and web servers.
In the thick multilayered sandwich of modern computing, HTTP lies somewhere in the middle. It's not responsible for shunting raw data from one place to another over the internet; that job is performed by a system known as TCP/IP. Nor is it responsible for the actual content and layout of your browser window; that's the responsibility of the hypertext markup language (HTML) and its allies. HTTP bridges the gap between TCP/IP and HTML.
HTTP assumes a connection between the browser and the server, and then it defines what requests the browser can make of the server and how those are expressed.
When you click on a link your browser follows the HTTP rules to ask the web server hosting the site for the web page, file or whatever the link points to. Eventually the server responds and, according to the rules, the first line of its response must contain a three-digit code followed by a brief text description of what happened. The text is for humans, the code is for computers.
Codes in the 200s indicate the request was successful, while those in the 400s indicate there was something wrong with it. Our friend 404 lives herein and indicates the requested item wasn't found on the server and the server doesn't know where to find it.
Sometimes you'll see other codes in this range, such as 403 which indicates unauthorised access. This usually happens if you try to visit a password-protected page without the right credentials.
There are other categories of response codes too: the 500s indicate a server error, and the 300s redirect the browser to a new location where the requested item now resides.
Response codes are hidden most of the time, even though every browser request is answered with one.
When things go wrong, though, sometimes the only thing to do is show the server's response, and the code is part of that.
Incomprehensible error codes are dismayingly common on the net, though they all mean something to someone. Now 404 means something to you. Alas knowledge isn't always power: knowing what 404 means probably won't stop those digits getting you down next time you encounter yet another broken link.
- © Fairfax NZ News
Do you check your smartphone in bed?Related story: Smartphone etiquette - should you take it to bed?