The Help Centers

Help, News and other information for success in life on and off the web.

The Help Centers header image 2

HTTP wha?

October 10th, 2007 · No Comments

Have you ever asked yourself “What is HTTP?” often people don’t but it’s used by EVERY SINGLE WEBSITE ON THE INTERNET! So read on about this simple yet pervasive protocol on the Internet.Read More Below...

HTTP stand for Hyper Text Transfer Protocol. (A protocol is defined loosely as a way to do things) This is the language that web servers and web browsers speak to each other.

Much like a conversation at the counter of the infamous Soup Nazi kitchen from the popular Seinfeld TV show the relationship between a web browser and web server is very strict. When a rule is broken “No SOUP FOR YOU!”

A common HTTP conversation would go something like.

Web Browser: “Could you get me this page?”
Web Server: “Found it and it’s this big and made of text and I like cats”
Web Server: “Here’s the page” hands the page to the browser

Ok I took some artistic license but lets look at all the steps.

  • The FIRST step is a simple request. Usually GET but can be POST or a few others it then ask for the page it wants or URI.
  • The second step is the web server responding with a header for the page. This lets the browser know how a few things about what the server is sending such as if it’s HTML a picture or even a download. Also the server can do some dynamic processing such as server side includes, PHP, Perl, CGI.
  • Finally the page or data is sent from the server.

Each request can ONLY really get one thing (e.g text, image, flash) so for a single web page this little talk can happen several times. Web servers and browsers have found ways to streamline multiple requests and they happen EXTREMELY fast (even on dialup) but every so often you can see a web page where an image or something just takes a bit longer to appear.

Each request can have one method the most prevalent are

  • GET - this is the most frequent request. This is what you usually use when you click on a link or type in a URL
  • POST - This is most often used to send data to the server from a form.

Server responses to the above requests fall into 4 categories.

  • 200 - OK EVERYTHING is peachy
  • 300 - Content has moved or a redirect response usually the two following options
    • 301 Content is no longer here and you should look at this new URL permanently
    • 203 Content has temporarily moved to this new URL but check back here again
  • 400 - Errors this includes
    • 401 - Not Authorized - you need to be authorized on the server to do this
    • 403 - Forbidden - Somthing in the request is NOT allowed on the server
    • 404 - File not found - the request could not find the file you requested
  • 500 - Server errors - this usually happens when there is a problem with the server such as misconfiguration OR overloading

Finally HTTP by itself is stateless. Meaning that the requests themselves don’t know about any requests before or after them. This means that data related to the user must be resent each time a request is made or something on the server must coordinate requests.

The HTTP protocol may seem a bit complicated but compared to some protocols its rather simple. The GREAT news is that most of the time you don’t even have to worry about what happens under the covers when using HTTP you just have to remember the URL and type it into your browser.

Tags: Web Development

You Comment I follow!

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.