Web servers MCQs Quiz | Class 10

This quiz tests your knowledge on Web servers, a fundamental component of the internet, as covered in Class X Computer Applications (Code 165), Unit 1: Networking. It specifically focuses on servers hosting websites and the request/response concept. Complete the quiz to test your understanding, then submit to see your score and download a detailed answer PDF for revision.

Understanding Web Servers and the Request/Response Cycle

Web servers are the backbone of the internet, responsible for storing and delivering website content to users worldwide. When you access a website, a complex but rapid interaction takes place between your device (the client) and a web server.

What is a Web Server?

A web server is a computer program that stores website files (like HTML documents, CSS stylesheets, JavaScript files, images, and videos) and delivers them to web browsers or other client applications upon request. It’s essentially a powerful computer constantly connected to the internet, running specialized software designed to handle web traffic.

The Client-Server Model: Request and Response

The interaction between your browser and a web server follows a client-server model, characterized by a “request-response” cycle:

  1. Request: When you type a URL (e.g., www.example.com) into your web browser and press Enter, your browser acts as the “client.” It sends a request over the internet to the web server that hosts www.example.com. This request typically uses the Hypertext Transfer Protocol (HTTP) or its secure version, HTTPS. The request asks for specific resources, like a web page.
  2. Server Processing: The web server receives this request. It locates the requested files on its storage. If the page involves dynamic content (like a login page or search results), the server might process scripts (e.g., PHP, Python, Node.js) to generate the content.
  3. Response: Once the server has found or generated the content, it sends a “response” back to your browser. This response includes the requested web page (HTML), along with any associated CSS, JavaScript, images, and other media files. The server also sends an HTTP status code (e.g., 200 OK for success, 404 Not Found if the page doesn’t exist).
  4. Browser Rendering: Your browser receives the response and then renders (displays) the web page on your screen, making it interactive and visible to you.

Key Components and Concepts:

  • HTTP/HTTPS: Hypertext Transfer Protocol is the foundation of data communication for the World Wide Web. HTTPS is the secure version, encrypting data between the browser and server.
  • Files Hosted: Web servers store all the assets that make up a website. This includes static files (HTML, CSS, JavaScript, images, videos) and often dynamic content generated by server-side scripts.
  • Web Server Software: Popular software used for running web servers includes Apache HTTP Server, Nginx, Microsoft IIS (Internet Information Services), and others.
  • IP Addresses and Domain Names: Every web server has a unique IP address (e.g., 192.168.1.1). Domain Name System (DNS) translates human-readable domain names (e.g., cbsequiz.in) into these IP addresses, allowing your browser to locate the correct server.

Client vs. Server

Feature Client (Your Browser/Device) Server (Web Server)
Role Requests information/resources Stores and provides information/resources
Location User’s local computer, phone, tablet Remote computer, often in a data center
Software Web browsers (Chrome, Firefox, Edge), mobile apps Web server software (Apache, Nginx, IIS)
Actions Sends requests, renders web pages Receives requests, processes, sends responses

Quick Revision:

  • Web servers store website files and deliver them.
  • The internet operates on a client-server request/response model.
  • HTTP/HTTPS are protocols for web communication.
  • HTML, CSS, JS, and media files are stored on web servers.
  • Apache, Nginx are common web server software.
  • DNS translates domain names to IP addresses for server location.

Practice Questions

  1. Which protocol is primarily used by web browsers to request web pages from a server?

    • a) FTP
    • b) HTTP
    • c) SMTP
    • d) DNS

    Correct Answer: b) HTTP

  2. What is the purpose of an IP address for a web server?

    • a) To send emails
    • b) To identify its unique location on the network
    • c) To create new web pages
    • d) To store user data encrypted

    Correct Answer: b) To identify its unique location on the network

  3. When a web server responds with a ‘404 Not Found’ error, what does it typically mean?

    • a) The server is offline.
    • b) The requested web page or resource could not be found.
    • c) The user entered an incorrect password.
    • d) The server is too busy.

    Correct Answer: b) The requested web page or resource could not be found.

  4. Which of the following is NOT a type of file typically hosted on a web server for a website?

    • a) HTML documents
    • b) CSS stylesheets
    • c) Operating system kernel files
    • d) Image files

    Correct Answer: c) Operating system kernel files

  5. What is the process called where a web browser displays the content received from a web server?

    • a) Encoding
    • b) Transmitting
    • c) Rendering
    • d) Compressing

    Correct Answer: c) Rendering