Translate

Saturday, November 24, 2012

HTTP status codes tutorial

If you delete your internet explorer cache, open the f12 tools  (by pressing F12 key) and then try to visit www.google.com, this is what you see in the f12 tool
















So this is what happens, since you cleared the cache, the browser gets all the resources from server. The 200 (inside the red box) that you see in the result column, means the fetch was successful. This HTTP status code is a part of the response header.

Now if you refresh the page, this is what you see,


Notice that the HTTP status codes for all the image and javascript resources has a status code of 304. What this means is that this resource has not changed since it was last requested. When the browser gets this message, it loads this resource from the browser cache.

A complete list of HTTP status code can be found here

Status codes are classified into the following categories.

Range
What it means
100-199
Information
200-299
Some success message
300-399
Some form of redirection
400-499
Client made a bad request
500-599
There was some error at the webserver


These are the most common status codes you would come across

Status code
Meaning
200
The request has succeeded
304
Resource not modified since the last fetch.
404
Not found



No comments:

Post a Comment

Comments will appear once they have been approved by the moderator