Your path to enlightenment begins by learning at a detailed level what a web server does, and what a web browser says to that server.
Do these tutorials:
http://ruslanspivak.com/lsbaws-part1/
http://ruslanspivak.com/lsbaws-part2/
http://ruslanspivak.com/lsbaws-part3/
And when you are doing web development, use this command to understand exactly what is being passed between client and server (replace port number with the port number that your server is running on).
sudo ngrep -W byline -d lo port 8001
You have progressed to the next rank in your journey when you understand in detail what a request (typically from a browser) looks like and how it is structured, and what a response (from a web server) looks like and how it is structured.