Thursday, 28 May 2015

What is a Browser? How Does it fetches Web Pages?

When we open google chrome and type www.google.com, we are able to see a web page. How is browser getting and displaying that page.  To know that, first let us know what is a browser.


What is a Browser?
  1. A Browser is a software application(process) running on your computer.
  2. It is used to fetch Information Resource(web pages) from Web Servers.
  3. It will send a request to Web server for Information Resource and Web server will respond back with Information Resource.


How will Browser identify Information Resources to be fetched?
  1. Information Resource is identified by a URI.
  2. URI - Uniform Resource Identifier.
  3. Eg: http://www.google.com/

How will Browser sends request to Web Server?
  1. Browser will form a URI and sends request using HTTP Protocol.
  2. HTTP functions as a request-response protocol.
  3. HTTP client initiates a request by establishing a TCP connection to a particular port on a server(80 or 8080)
  4. Web Server listening on port 80 will process the request, creates response and sends it back using same tcp connection.

What are the types of requests a Browser can trigger using HTTP?

HTTP Provides different request methods to trigger various requests to server.

GET - Requests using GET method should only retrieve data and have no other effect.
HEAD - Request using HEAD method retrieves only metadata information(like response state, response content type etc) without response content.  This is useful incase to test the meta data information of response with exact response content.
POST - A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.
PUT - Replaces all current representations of the target resource with the uploaded content.
DELETE -  Deletes the resource on the server.
CONNECT - Establishes a tunnel to the server identified by the URI.
OPTIONS - It is used to find out the HTTP Methods supported by web server.
TRACE - Trace method is used to send back the contents of http request in http response. it is mainly used for debugging while development.


How will Browser Interpret the response from Web Server?

  1. The response sent by the Web Server should be interpreted by the browser.
  2. Before that, browser should be able to understand if the request it has sent is processed by web server properly.
  3. The request status will be sent to browser by web server in the response using HTTP Status Codes.
  4. Various Status codes will give information about the request status. To know more about HTTP STATUS CODES Please go to - Http Status codes.


Written By:
VENKY -- (Jarvishelp Member)
For more information:
www.jarvishelp.in
mail@jarvishelp.in





1 comment:

  1. Thanks for such detailed explanatione. Keep posting :)

    ReplyDelete