- client-server E.g. websites
- peer-to-peer E.g. Skype, Instant Messaging/Chat
---------------------------------------------------------------------------
CLIENT - a software application
E.g. - web browser (IE, Firefox, Chrome)
SERVER - a software application
E.g. - web server (IIS, Tomcat, Apache)
---------------------------------------------------------------------------
To contact SERVER , CLIENT needs to know -
1. on which machine the SERVER is running
2. on which Port the SERVER is listening (The Port is also necessary because 1 machine can host more than 1 SERVER software. For e.g. we can have the Web Server, Database Server, Email (SMTP) Server running on the same machine, but listening on different ports.
Server 'hosted' on the same machine. In that case, each SERVER software listens for requests on a particular port.
Example - by typing a URL (e.g http://www.cricinfo.com) in a browser's address bar, we tell the browser (CLIENT) the above 2 pieces of information i.e. which machine and port to
connect to.
---------------------------------------------------------------------------
CLIENT and SERVER can be located on same machine or on different machines
---------------------------------------------------------------------------
Web browser and Web Server Communication
CLIENT - makes a Http Request
SERVER - responds with a Http Response
Fiddler example
- use Request Builder to make a Http Request
- use Inspectors to see the Request and Response
- change User Agent Strings by changing the Rules -> User Agents setting
Show different User Agent Strings at - http://www.useragentstring.com/pages/Chrome/
Chrome - Inspect Element screen
We can copy a website using Firebug/Chrome developer tools
---------------------------------------------------------------------------
No comments:
Post a Comment