HTTP Response Codes

By Unknown - Monday 3 November 2014 No Comments
In certain situations we can see different error messages appearing in web sites. For example, error messages like 404- Not Found, 403-Forbidden, 500- Internal Server Error may appear. In such situations we have to know, what those are and for what purpose are they. So this post is to understand the meaning of such codes known as HTTP Status Codes.
 photo http-codes-620x412_zpsc3dd3d8f.jpg
HTTP (Hyper Text Transfer Protocol) is the method of communication of your web browser  with an internet server. When you click a link or submit a form or enter a url in the browser, the browser sends a request to the relevant web server. That is to request for a web page or to send some data. In either case this request is known as the HTTP Request. Once the request is received, the server sends back a message and that is known as the HTTP Response. What we receive from that response is actually the HTTP Status. But we can’t see all the HTTP Status received by the browser. But some are displayed on the browser. Those are the ones you see as 404- Not Found, 403-Forbidden and 500- Internal Server Error.

HTTP Response Codes those provide details

100 – Continue
Normally the first response received by the browser after a request is this. This implies that part of the sent request was successfully received and that the rest can be received.

101 – Switching Protocols
Now the messages between the server and the browser are exchanged through HTTP 1.1 protocol. But it is only a protocol. The browser receives this status code once the server accepts the request sent by the browser to change the above protocol to another.

HTTP Response Codes that shows the success

200 – OK
This is the most commonly used code. This code is displayed to show that the request sent by the browser was successfully received and that the server is acting accordingly.

201 – Created
The meaning of this code is that the actions are done according to the sent request. For example, this implies that the requested web page by the browser is ready to send.

202 – Accepted
This implies that the request was successfully understood, accepted and willing to act accordingly.

203 – Non- Authoritative Information
203 status code tells that the request was received, it was understood and the details sent to the browser are from a third party server. This is similar to 200.

204 – No Content
204 code informs the browser that the request was received, it was understood and there is no need to send back any data.

205 – Reset Content
This is used by the server to inform the browser to change the sent data back to the original state. For example, browser is told to clear a completed sent form by this code.

206 – Partial Content
This is used to inform the browser that only a part of the requested page is ready to send. This code is used when using Cashing Tools.

HTTP Response Codes for Redirection

300 – Multiple Choices
This implies that the requested data or web page has been transferred to another location. Further, the sending new locations of most suitable web page or data and allowing the browser to choose one of them is another task of this code.

301 – Moved Permanently
This tells that the requested web page or data has been permanently transferred to new location. It also informs the browser about the new location of requested page or data. On the other hand it further informs the browser to use the new address next time.

302 – Found
This tells that the requested data has been transferred to a new location temporarily. Code also provides the new location to the browser.

303 – See Other
This status code is used to tell the browser about another location of the requested page. But this does not imply that the requested data has been moved to new location.

304 – Not Modified
This shows that the requested page has not been changed. When we are going to see a page that was viewed previously, if it has been cashed the browser finds whether a change has been made to the sources of the page. When checking that if the browser finds out that no change has been made, the above code appears.

305 – Use Proxy
This informs to use proxy to view the requested web page.

307 – Temporary Redirect
The task done by this code is similar to that of code 302.

400 – Bad Request
This code informs the browser that the web server was unable to understand the request send by the browser due to syntax errors.

401 – Unauthorized
This code implies that server must give permission to the browser before sending the requested page.

402- Payment Required
For the time being this code is not in use. It is reserved for future use.

403 – Forbidden
This code implies that client browser do not have the permission to go to the requested page. When incorrect usernames or passwords are used or none of them are used this kind of code may appear.

404 – Not Found
The internet users are well aware of this code. This shows that the web page requested by the browser is not available in the web server. This further implies that the server do not contain any other information of the page.

405- Method not allowed
When browser tries to get information through a way not authorized by the server (the main methods of requesting information from a server are POST and GET) this code appears.

406 – Not acceptable
This code says that although the server was successful in understanding the request and it has the ability to act according to the request, the browser is not in a position to understand the information that is to be sent.

407 – Proxy authentication required
This is similar to 401. Further this implies to use proxy to send the requested information.

408 – Request timeout
There is a time limit that server spends to receive a request from the browser. This code says that  the request sent by the browser was not received during the relevant time period.

409- Conflict
This implies that the server cannot act according to the request. When request asks to delete or edit an existing file or create a new file and server is unable to do that, this code appears.

410 – Gone
This code is similar to 404. This says that the requested page is not available in the server.

411 – Length required
411 code appears when the content length is not contained in the request sent by the browser.

412 – Precondition failed
If some condition in the request sent by the browser cannot be fulfilled by the server this code appears.

413 – Request entity too large
This message appears when server receives a request which cannot be handled by the server due to its size.  Normally this happens when data sent to the server using POST method has a size larger than the maximum size permitted by the server according to its settings.

414 – Request URL too long
This implies that server received a URL which is too lengthy.

415 – Unsupported media type
This code appears when server receives a request sent by the browser in a format unsupported by the server.

416 – Request range not satiable
This implies that the server cannot act according to the request. For example, in a situation where a document of size from 800 to 900 bites is requested from the browser and only receives 200 bites we get the 416 code.

417 – Expectation failed
This code says that the server is unable to provide data as requested by the browser

HTTP response codes for Server errors

500 – Internal server error
This code says that the server is unable to act according to the request due to a problem in the server. Generally this happens due to misconfiguration of .htaccess in the server.

501 – Not implemented
The code 501 says that the server does not support all components required for the completion of the request.

502 – Bad gateway
When a server acts as a proxy, the cancellation of a response received by another server gives rise to this code.

503 – Service unavailable
This message is very often appeared in busy web sites. This code implies that the server cannot act according to the request since the server is busy.

504 – Gateway timeout
The code 504 appears in a situation where a server is dealing with another server as a proxy and the other server is not responding on time.

505 – HTTP version not supported
This code says that the server is unable to support the HTTP version requested by the browser. The response also contains the HTTP version that is supported by the server.

No Comment to " HTTP Response Codes "