In last post of Understanding Web Communication we saw the two distinct parts of Web communications. Now we will understand what is the role of Web Server in web communication.
The modern web server do far more. It does some basic actions to
- Verify that the request is structured legitimately.
- Malicious client can malformed web request to compromise web servers.
- This should be detected by the web server and generally it should be ignored.
- Authenticate itself.
- If we are using HTTP Secure protocol then web browser uses certificate to authenticate the server.
- Web server will return the information in encrypted format.
- Authenticate the user.
- If the information is sensitive then web server verifies that the user has submitted credentials.
- If user have not submitted it then it returns redirection for user to authorization form.
- Authorize the user.
- After the authentication of user by web server, it should verify the user is allowed to access specified content or not.
- Determine how to handle a request.
- If user request the static content then web server can directly respond to request.
- If user have requested the dynamic content then web server must transfer the request to ASP.NET.
- Handle Errors.
- If the users request can’t be processed then web server should provide the detail error information to web browser.
- Cache Output.
- To improve the response time for request, generally web server can cache output.
- Web server provides the caching information to web browsers so web browser know how long to keep the content cached.
- Compress output.
- Before returning a page to a web browser, a web server can compress the content to reduce the bandwidth required.
- Log Access.
- Web servers typically record the usage/request information for security and monitor the performance.