I've lately began my job as web application after sales developer. I'm bit stuck to understand lifecycle of the Http request.
Things I understood is
- Every Http request first contacts a DNS server which resolves the request URL domain to some Ip.
- After fetching the Webserver Ip request is submitted into it(via PUT request). A webserver like apache handles this request and forwards this to application which needs to handle this.
Following this I'm lost with
- How fact is sent through the application towards the user who asked for it and can Apcache involved with this?
- Can One begin to see the entire flow during my browser with a few debugging tools?
- Can someone refer some links to know this thorough?
I believe you're a little wrong in your knowledge of it.
If put forth world wide web.google.com (not using any forms, just wanting the website), this is exactly what happens:
- First the browser must translate world wide web.google.com for an Ip if it doesn't know it. Whether it knows it, nothing happens at this time. If it doesn't realize it, it contacts a DNS server to solve the title.
- Then browser will open a TCP link with the Ip of world wide web.google.com and send a HTTP GET request over. Within this example it will likely be
GET / HTTP/1.1
- The server software can get this HTTP request. It'll in some way generate a HTTP response and send that back trough the TCP connection. The way the server performs this is server software dependent. You are able to for instance connect application code in Apache, or simply make Apache return personal files in the filesystem. PHP is definitely an application known as by some software, which in turn creates the response delivered to the browser. Once the fact is sent, in HTTP version 1. the bond is closed. HTTP 1.1 might have persistent connections though.
- Once the browser will get the response, it typically renders it on the watch's screen. The HTTP request has become done. A click "search" will be sending a brand new request towards the server.
GET, PUT, Publish, Remove yet others are HTTP request techniques. They've special meaning which you'll see within the RFC.
Snacks are generally accustomed to identify exactly the same user across multiple HTTP demands, known as periods. Therefore these snacks are known as session snacks
You are able to debug the communication using a network sniffer tool, for instance Wireshark. Opera has a 3rd party wordpress plugin known as Tamper Data that may alter the request before they're delivered to the server.
The HTTP RFC is a useful source of the way it all works.
Hope it will help.