“Most internet users have got used to HTTP errors.” Read on to get a basic idea of how information reaches your browser and what causes it to fail sometimes, resulting in an error message.
This article has been published as submitted by the writer without any editing by Chillibreeze so you can critique it, in its original format. Please feel free to rate and comment on this article.
Submit your article and be rated by other Indian writers
Scroll down to the bottom to rate this article.
Author: Manoj KG
Most internet users have got used to HTTP errors, especially 404: Not Found. Personally I believe that the chance of getting a 404 error when you click on a link is directly proportionate to the importance of information connected to that link and inversely proportionate to the available time. Do you remember an instance when you encountered a “Not found” or “Gone” error when you were surfing the Internet just for fun?
The idea behind this article is to get a basic idea of how information reaches your browser and what causes it to fail sometime, resulting in an error message.
Most web sites and portals have their own business related error messages. For example when you click on a link, if it displays a message saying “The site is under renovation”, that’s exactly what the site owners wished to convey when you clicked on that link. Another example is login failure message. We are planning to discuss these kind of errors. Before getting in to what exactly HTTP errors are and what causes them, let’s first get an idea of how exactly your browser works.
The responsibility of a browser is to communicate with a web server, which is running and listening for requests somewhere on the Internet, and to get you the information. Another job that a browser does for you is to present that information in a user friendly way. The language that the web browser uses to communicate with the web server is HTTP (Hyper text transfer protocol). But when something goes wrong, instead of the expected data, the web server returns an error code.
Let’s try to understand what happens when you type the URL of the web site in your browser. What it does is to convert that in to the following command and to execute it.
GET / HTTP/1.0 Host: www.yoursite.com
In this GET is the command, HTTP is the protocol, 1.0 is the version of protocol and www.yoursite.com is the address of the site on the Internet. Here the browser is giving the instruction to find the website, www.yoursite.com, and to get its content using HTTP protocol. The web server, which is waiting at that address, on receiving this command will return back the data in the following format.
HTTP/1.0 200 OK
Content-Type: text/html
<head>
<title>Welcome to your site </title>
</head>
<body>
This is your site.
</body>
This data which is returned to the browser has two parts. One is meant for the browser to interpret about what happened to the request. This part of the data is called the header. Another part is for the browser to display to the user, known as the body. In the above example, the header is shown in italics. It tells the browser three things
- HTTP/1.0 is the protocol the web server is using here to send the data.
- The status of the request is “200 OK”, which means that it has been completed successfully.
- The data sent to display on the browser is of type text/html.
Now let’s see an example of another type of data returned from the web server
HTTP/1.1 404 Not Found
Date: Wed, 28 Feb 2007 04:15:42 GMT
P3P: policyref=”http://p3p.yahoo.com/w3c/p3p.xml”, CP=”CAO DSP COR CUR ADM DEV T
AI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI
PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV”
Cache-Control: private
Vary: User-Agent
Content-Type: text/html; charset=utf-8
Connection: close
I got this when I tried to get a page, which doesn’t exist, from Yahoo. So the Yahoo web server sent back this data to me. Now if you check the status code here, it says 404 not found. The browser will take that part and then show the message “404 Not found”. (When you try this using the browser, make sure you disable the “show friendly HTTP error” check box in Internet Explorer. You can find this by selecting ‘Tools’ in the menu and then clicking on the Internet options. Then select the “Advanced” tab on the window. “Show friendly HTTP error” will be an item under this. Also keep in mind that the browser will show you the processed data. The above data shown was received when I tried connecting to the web server with out using the browser.)
404 is one such error code. HTTP provides a set of predefined error codes for the web server and browser to use based on the various scenarios. Let’s try to understand them one by one.
- 400 Bad Request
The web server is telling the browser that the request was a bad one, a pretty straightforward message! Basically this happens when you send the data, which is not really following the HTTP.
- 404 Not found
The web server couldn’t find out the required resource. This usually happens when the file is moved to a different location.
- 403 Forbidden
Here the web browser is able to communicate with the server and the resource is available, but there isn’t sufficient permission to access it.
- 408 request timeout
This happens when there is no activity for a long time after the connection is created between the web server and the browser. This usually happens when the band width is low.
- 410 Gone
The resource, which may have been available earlier, cannot be located.
In addition to this there are a couple of other error codes which HTTP uses. They are
- Unauthorized
- Payment required
- Method not allowed
- Not Acceptable
- Proxy Authentication Required etc.
The above list is not complete. If anybody is interested in knowing more about the HTTP protocol, a good place to look will be the W3C site, which decides the standard.
Byline: I am currently working as Senior Programmer Analyst. Software processes, Test First Development practices and software metrics interest me in addition to photography.
More on Chillibreeze
Read, rate and comment on more such articles by Indian writers
Take advantage of our confidential and professional article review services to get your writing rated by an expert critic
Check out our Writing Courses and Writing Assessments
Want to work on client projects? Read more about our screening process.
Related posts:
- Tivoli Storage Administrator
- Indian English Error
- How to Find What you are Looking for on Search Engines!
- The Internet and the WWW–A Writer’s Best Friends!
- Our Privacy Policy
Comments:





{ 1 trackback }
{ 1 comment… read it below or add one }
OK but too technical for the average user. Maybe if you are searching for something related, you might find it useful.