Web Technology

106609
Back to Web Technology

Module II: Browser and Apache Web Server Architecture

  1. Q1(b). Explain the role of web browser.20232m

    Module II: Browser and Apache Web Server Architecture

    Explain the role of web browser.

    View this question on its own page →
    Worked Solution

    A web browser is client software that lets a user request, retrieve, and view web resources.

    • Sends requests: builds HTTP/HTTPS requests for a URL and sends them to the web server.
    • Receives responses: downloads the HTML, CSS, JavaScript, images, and other resources.
    • Renders pages: parses HTML into the DOM and CSS into the CSSOM, then lays out and paints the page.
    • Runs scripts: executes JavaScript through its engine (e.g. V8) to make pages interactive.
    • Manages state and security: stores cookies, cache, and history, and enforces the same-origin policy and TLS.

    Examples: Chrome, Firefox, Safari, Edge.

  2. Q1(c). A browser receives an HTML document containing references to images, CSS files and scripts. Which browser subsystem is primarily responsible for interpreting the document and producing the visual representation? (i) Rendering engine (ii) Database engine (iii) Mail server (iv) FTP server20262m

    Module II: Browser and Apache Web Server Architecture

    A browser receives an HTML document containing references to images, CSS files and scripts. Which browser subsystem is primarily responsible for interpreting the document and producing the visual representation?
    (i) Rendering engine
    (ii) Database engine
    (iii) Mail server
    (iv) FTP server

    View this question on its own page →
    Worked Solution

    Correct answer: (i) Rendering engine. It parses HTML and CSS, computes layout and paints the page's visual representation.

  3. Q1(c). Which protocol is used for transferring web pages? (i) FTP (ii) SMTP (iii) HTTP (iv) POP320242m

    Module II: Browser and Apache Web Server Architecture

    Which protocol is used for transferring web pages? (i) FTP (ii) SMTP (iii) HTTP (iv) POP3

    View this question on its own page →
    Worked Solution

    Answer: (iii) HTTP

    HTTP (HyperText Transfer Protocol) transfers web pages between browser and server. FTP transfers files, SMTP sends email, and POP3 retrieves email.

  4. Q1(d). Browser configuration primarily affects (i) Only the physical network topology (ii) The definition of HTML grammar (iii) User and browser behavior such as security, connection and display-related settings (iv) The structure of an XML document20262m

    Module II: Browser and Apache Web Server Architecture

    Browser configuration primarily affects
    (i) Only the physical network topology
    (ii) The definition of HTML grammar
    (iii) User and browser behavior such as security, connection and display-related settings
    (iv) The structure of an XML document

    View this question on its own page →
    Worked Solution

    Correct answer: (iii) User and browser behavior such as security, connection and display-related settings. Browser configuration includes privacy, proxy, cookies, certificates and display preferences.

  5. Q1(d). What is the function of Apache Web Server's mod_proxy module? (i) Load balancing (ii) Database connection pooling (iii) Email handling (iv) Content rendering20242m

    Module II: Browser and Apache Web Server Architecture

    What is the function of Apache Web Server's mod_proxy module? (i) Load balancing (ii) Database connection pooling (iii) Email handling (iv) Content rendering

    View this question on its own page →
    Worked Solution

    Answer: (i) Load balancing

    mod_proxy lets Apache act as a proxy/reverse proxy and, with mod_proxy_balancer, distribute requests across multiple backend servers. It does not handle database pooling, email, or content rendering.

  6. Q1(e). Which protocol is specifically associated with transferring files between a client and a server? (i) SMTP (ii) FTP (iii) POP (iv) HTTP only20262m

    Module II: Browser and Apache Web Server Architecture

    Which protocol is specifically associated with transferring files between a client and a server?
    (i) SMTP
    (ii) FTP
    (iii) POP
    (iv) HTTP only

    View this question on its own page →
    Worked Solution

    Correct answer: (ii) FTP. File Transfer Protocol transfers files between clients and servers. Standard FTP is not encrypted; FTPS and SFTP are secure alternatives, and SFTP uses SSH.

  7. Q1a. A DNS client is called (i) DNS updater (ii) DNS resolver (iii) DNS handler (iv) None of the above20192m

    Module II: Browser and Apache Web Server Architecture

    A DNS client is called

    (i) DNS updater
    (ii) DNS resolver
    (iii) DNS handler
    (iv) None of the above

    View this question on its own page →
    Worked Solution

    Correct Answer: (ii) DNS resolver

    Explanation:

    • A DNS client is known as a DNS Resolver (or stub resolver).
    • It runs on client operating systems and applications (e.g., web browsers) to initiate DNS queries, contacting local recursive DNS servers to resolve human-readable domain names (e.g., www.example.com) into IP addresses (e.g., 93.184.216.34).
  8. Q1b. If a server has no clue about where to find the address for a hostname, then (i) server asks to the root server (ii) server asks to its adjacent server (iii) request is not processed (iv) None of the above20192m

    Module II: Browser and Apache Web Server Architecture

    If a server has no clue about where to find the address for a hostname, then

    (i) server asks to the root server
    (ii) server asks to its adjacent server
    (iii) request is not processed
    (iv) None of the above

    View this question on its own page →
    Worked Solution

    Correct Answer: (i) server asks to the root server

    Explanation:

    • When a recursive DNS server receives a query for a hostname and has no cached record or zone information for it, it initiates the standard hierarchical lookup process by querying one of the 13 logical Root Name Servers (e.g., a.root-servers.net).
    • The root server points the recursive resolver to the authoritative Top-Level Domain (TLD) server (e.g., .com or .org), which in turn directs it to the domain's authoritative name server.
  9. Q1c. The component of a web browser responsible for displaying content on the screen is (i) Rendering engine (ii) Networking engine (iii) JavaScript engine (iv) UI backend20252m

    Module II: Browser and Apache Web Server Architecture

    The component of a web browser responsible for displaying content on the screen is

    (i) Rendering engine
    (ii) Networking engine
    (iii) JavaScript engine
    (iv) UI backend

    View this question on its own page →
    Worked Solution

    Correct Answer: (i) Rendering engine

    Explanation:

    • The Rendering Engine (also known as layout engine) is responsible for parsing HTML documents, styling information from CSS, and painting the rendered layout onto the user's screen.
    • Popular rendering engines include Blink (Chrome, Edge), Gecko (Firefox), and WebKit (Safari).

    Roles of other Browser Components:

    • Networking Engine: Handles HTTP/HTTPS requests, network communication, and security certificates.
    • JavaScript Engine: Parses, compiles, and executes JavaScript code (e.g., V8, SpiderMonkey).
    • UI Backend: Provides generic drawing widgets like combo boxes and windows.
  10. Q1d. The configuration files of most web browsers are stored in (i) Temporary Internet files (ii) Cache directory (iii) User profile directory (iv) Application directory20252m

    Module II: Browser and Apache Web Server Architecture

    The configuration files of most web browsers are stored in

    (i) Temporary Internet files
    (ii) Cache directory
    (iii) User profile directory
    (iv) Application directory

    View this question on its own page →
    Worked Solution

    Correct Answer: (iii) User profile directory

    Explanation:

    • Modern web browsers store user-specific configuration files, custom preferences, bookmarks, extensions, and session data in the User Profile Directory (e.g., in AppData/Roaming or ~/.config/).
    • This allows multiple users on the same operating system to maintain independent browser configurations.

    Comparison:

    • Temporary Internet files / Cache directory: Store cached web assets (images, stylesheets, scripts) to speed up subsequent visits, not settings.
    • Application directory: Contains the executable binaries and system libraries of the browser.
  11. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  12. Q1e. Which of the following is an open-source web server software? (i) IIS (ii) Apache (iii) Nginx (iv) Tomcat20252m

    Module II: Browser and Apache Web Server Architecture

    Which of the following is an open-source web server software?

    (i) IIS
    (ii) Apache
    (iii) Nginx
    (iv) Tomcat

    View this question on its own page →
    Worked Solution

    Correct Answer: (ii) Apache (Note: Nginx and Tomcat are also open-source; IIS is proprietary)

    Explanation:

    • Apache HTTP Server is the most widely recognized open-source HTTP web server software developed and maintained by the Apache Software Foundation (ASF) under the Apache 2.0 License.
    • IIS (Internet Information Services) is a proprietary web server created by Microsoft.
    • Nginx and Apache Tomcat are also open-source server technologies, but in academic curricula Apache is standardly recognized as the primary open-source web server.

    Key Features of Apache HTTP Server:

    1. Modular architecture (DSO - Dynamic Shared Objects).
    2. Highly customizable via .htaccess and httpd.conf.
    3. Broad support for CGI, PHP, Perl, and SSL/TLS.
  13. Q1f. Apache Tomcat is mainly used for (i) Serving static HTML pages (ii) Running Java-based web applications (iii) Hosting FTP servers (iv) Sending emails20252m

    Module II: Browser and Apache Web Server Architecture

    Apache Tomcat is mainly used for

    (i) Serving static HTML pages
    (ii) Running Java-based web applications
    (iii) Hosting FTP servers
    (iv) Sending emails

    View this question on its own page →
    Worked Solution

    Correct Answer: (ii) Running Java-based web applications

    Explanation:

    • Apache Tomcat is an open-source servlet container and application server designed to execute Java Servlets and render JavaServer Pages (JSP).
    • It implements the official Java Servlet, JSP, Java EL, and WebSocket specifications from the Jakarta EE project.

    Comparison:

    • Serving static HTML pages: Primarily handled by general web servers like Apache HTTP Server or Nginx.
    • Hosting FTP servers: Handled by FTP daemons (e.g., vsftpd, FileZilla Server).
    • Sending emails: Handled by SMTP Mail Transfer Agents (e.g., Postfix, Sendmail).
  14. Q1i. What does error 404 or Not Found error while accessing a URL mean? (i) The server could not find the requested URL (ii) Requested HTML file is not available (iii) The path to the interpreter of the script is not valid (iv) The requested HTML file does not have sufficient permissions20202m

    Module II: Browser and Apache Web Server Architecture

    What does error 404 or Not Found error while accessing a URL mean?

    (i) The server could not find the requested URL
    (ii) Requested HTML file is not available
    (iii) The path to the interpreter of the script is not valid
    (iv) The requested HTML file does not have sufficient permissions

    View this question on its own page →
    Worked Solution

    Correct Answer: (i) The server could not find the requested URL

    Explanation:

    • The HTTP 404 Not Found status code is a standard client-side error response indicating that the origin web server successfully received the client's request, but could not locate the requested resource (URL/endpoint) on the server.
    • Common causes: Broken/dead links, mistyped URL paths, deleted pages, or missing URL rewrite routing rules.

    Other Related HTTP Status Codes:

    • 401 Unauthorized / 403 Forbidden: The user lacks sufficient permissions to access the resource.
    • 500 Internal Server Error: The server encountered an unexpected error or script interpreter failure.
    • 502 Bad Gateway: An upstream server failed to respond properly.
  15. Q3(b). Outline the architecture of a web browser. How do the various components interact to render a webpage?20247m

    Module II: Browser and Apache Web Server Architecture

    Outline the architecture of a web browser. How do the various components interact to render a webpage?

    View this question on its own page →
    Worked Solution

    Web browser architecture

    A browser is made of several cooperating components:

                +---------------- User Interface ----------------+
                | address bar, tabs, back/forward, bookmarks      |
                +------------------------+------------------------+
                                         |
                                +--------v--------+
                                | Browser Engine  |  (controls rendering engine)
                                +--------+--------+
                +------------------------+------------------------+
       +--------v--------+   +-----------v----------+   +---------v--------+
       | Rendering Engine|   |  Networking          |   | JavaScript Engine|
       | (Blink/Gecko)   |   |  (HTTP/HTTPS, DNS)   |   | (V8, SpiderMonkey)|
       +--------+--------+   +----------------------+   +---------+--------+
                |                                                  |
       +--------v--------------------------------------------------v-------+
       | UI backend  |  Data storage (cookies, localStorage, cache, IndexedDB)|
       +--------------------------------------------------------------------+
    

    Components

    1. User interface: everything visible except the page itself: address bar, tabs, navigation buttons, bookmarks.
    2. Browser engine: the link between the UI and the rendering engine; passes actions such as "load this URL".
    3. Rendering engine: parses HTML and CSS and displays the result (Blink in Chrome, Gecko in Firefox, WebKit in Safari).
    4. Networking: performs DNS lookups and HTTP/HTTPS requests, handles caching, cookies, and TLS.
    5. JavaScript engine: parses and executes JavaScript (V8, SpiderMonkey).
    6. UI backend: draws basic widgets (windows, form controls) using the operating system's graphics.
    7. Data storage: stores cookies, localStorage, sessionStorage, IndexedDB, and cache on disk.

    How components interact to render a page

    1. The user types a URL; the UI passes it to the browser engine.
    2. The networking layer resolves the domain through DNS, opens a TCP/TLS connection, and sends an HTTP request.
    3. The server's HTML response arrives; the rendering engine begins work.
    4. Parsing: HTML is parsed into the DOM tree; CSS is parsed into the CSSOM.
    5. Linked resources (CSS, JS, images) are fetched by networking; the JavaScript engine runs scripts, which can modify the DOM and CSSOM.
    6. Render tree: DOM and CSSOM are combined, keeping only visible nodes with their computed styles.
    7. Layout (reflow): the position and size of each node is calculated.
    8. Painting: pixels are drawn (text, colours, images), then layers are composited by the GPU and shown through the UI backend.
    9. Later user actions or script changes trigger reflow/repaint as needed.

    Modern browsers use a multi-process design (separate processes per tab, renderer, and GPU) for stability and security.

  16. Q3a. Describe the architecture of a web browser and explain its major components.20257m

    Module II: Browser and Apache Web Server Architecture

    Describe the architecture of a web browser and explain its major components.

    View this question on its own page →
    Worked Solution

    Answer: Web Browser Architecture and Major Components

    1. Introduction

    A web browser is a software application designed to retrieve, present, and navigate resources on the World Wide Web. Its internal architecture is modular, dividing tasks such as network communication, parsing, script execution, rendering, and persistence across distinct interacting subsystems.

    +-------------------------------------------------------------+
    |                       User Interface                        |
    +-------------------------------------------------------------+
                                  |
    +-----------------------------v-------------------------------+
    |                       Browser Engine                        |
    +-----------------------------+-------------------------------+
                                  |
    +-----------------------------v-------------------------------+
    |                      Rendering Engine                       |
    |  +--------------------+  +-------------------------------+  |
    |  |     HTML Parser    |  |          CSS Parser           |  |
    |  +---------+----------+  +---------------+---------------+  |
    |            |                             |                  |
    |            +-------------> Render Tree <-+                  |
    |                                  |                          |
    |                                  v                          |
    |                         Layout & Painting                   |
    +---------+------------------------+------------------+-------+
              |                        |                  |
    +---------v----------+  +----------v---------+  +-----v-------+
    |  Networking Layer  |  | JavaScript Engine  |  | UI Backend  |
    | (HTTP/HTTPS/DNS)   |  | (V8, SpiderMonkey) |  | (Widgets)   |
    +--------------------+  +--------------------+  +-------------+
                                       |
    +----------------------------------v--------------------------+
    |                       Data Persistence                      |
    |          (Cookies, LocalStorage, IndexedDB, Cache)          |
    +-------------------------------------------------------------+
    

    2. Major Components of a Browser

    1. User Interface (UI)

    • Includes all visible parts of the browser window except the main webpage viewport.
    • Elements: Address bar (Omnibox), Back/Forward/Reload buttons, Bookmarks menu, Tabs, and Settings.

    2. Browser Engine

    • Acts as an intermediary bridge between the User Interface and the Rendering Engine.
    • Manages high-level actions like navigation queries, history management, and loading progress indicators.

    3. Rendering Engine

    • The core component that parses HTML, XML, CSS, and embedded media, constructing the visual layout painted on screen.
    • Prominent Engines:
      • Blink: Google Chrome, Microsoft Edge, Opera, Brave
      • Gecko: Mozilla Firefox
      • WebKit: Apple Safari

    4. Networking Layer

    • Handles network communications, DNS lookups, TLS/SSL encryption, HTTP/HTTPS request-response cycles, and connection pooling.
    • Manages network caches, redirects, and proxy configurations.

    5. JavaScript Engine (Interpreter)

    • Parses, compiles (via JIT - Just-In-Time compilation), and executes JavaScript code.
    • Manages the execution stack, heap memory allocation, and garbage collection.
    • Examples: V8 (Chrome, Edge, Node.js), SpiderMonkey (Firefox), JavaScriptCore (Safari).

    6. UI Backend

    • Draws standard basic user interface widgets like combo boxes, input fields, checkboxes, and system alert windows.
    • Interfaces with the underlying Operating System’s graphic subsystem.

    7. Data Persistence (Storage Layer)

    • Stores persistent client-side data locally on the user's hard drive.
    • Supported Mechanisms:
      • Cookies: Small state tokens sent with HTTP requests.
      • Web Storage: localStorage (persistent) and sessionStorage (tab lifecycle).
      • IndexedDB: NoSQL client-side database for large structured datasets.
      • HTTP Cache: Stores downloaded static resources (scripts, images, CSS) to minimize latency.

    3. Basic Rendering Flow Pipeline

    HTML ---> DOM Tree ------+
                             +---> Render Tree ---> Layout ---> Paint ---> Screen
    CSS  ---> CSSOM Tree ----+
    
    1. Constructing DOM Tree: HTML tokens are parsed into Document Object Model nodes.
    2. Constructing CSSOM: CSS rules are parsed into the CSS Object Model.
    3. Render Tree Creation: Visible DOM nodes are merged with computed styles from CSSOM.
    4. Layout (Reflow): Browser calculates exact geometric coordinates and sizes for every visible element.
    5. Painting (Rasterization): Pixels are drawn and composited onto the screen display.
  17. Q3b. Explain how a web browser interacts with a web server using the HTTP request-response model.20257m

    Module II: Browser and Apache Web Server Architecture

    Explain how a web browser interacts with a web server using the HTTP request-response model.

    View this question on its own page →
    Worked Solution

    Answer: Browser-Server Interaction via the HTTP Request-Response Model

    1. Overview

    The HTTP (HyperText Transfer Protocol) request-response model is a client-server communication protocol where the web browser (client) initiates a request, and the web server processes the request and returns an appropriate response over a reliable TCP/IP connection.

    +--------------+                                      +--------------+
    | Web Browser  |                                      |  Web Server  |
    |   (Client)   |                                      |   (Apache)   |
    +-------+------+                                      +-------+------+
            |                                                     |
            |  1. DNS Resolution (Domain -> IP Address)           |
            |---------------------------------------------------->|
            |                                                     |
            |  2. TCP 3-Way Handshake (SYN, SYN-ACK, ACK)         |
            |====================================================>|
            |                                                     |
            |  3. TLS/SSL Handshake (For HTTPS connections)       |
            |====================================================>|
            |                                                     |
            |  4. HTTP Request (GET /index.html HTTP/1.1)         |
            |---------------------------------------------------->|
            |                                                     |
            |                   [Server Processes Request & DB]   |
            |                                                     |
            |  5. HTTP Response (200 OK + HTML Body)              |
            |<----------------------------------------------------|
            |                                                     |
            |  6. Sub-resource Requests (CSS, JS, Images)         |
            |<===================================================>|
            |                                                     |
            v                                                     v
    

    2. Step-by-Step Interaction Lifecycle

    Step 1: URL Parsing and DNS Lookup

    1. The user types a URL (e.g., https://www.example.com/index.html).
    2. The browser checks local caches (browser cache, OS cache, router cache).
    3. If not found, it queries DNS servers to resolve the domain name into an IP address (e.g., 93.184.216.34).

    Step 2: Establishing TCP Connection

    • The browser opens a connection to the server on port 80 (HTTP) or port 443 (HTTPS) using the TCP 3-Way Handshake:
      1. SYN: Client sends synchronization packet.
      2. SYN-ACK: Server acknowledges and responds with SYN.
      3. ACK: Client acknowledges back.

    Step 3: TLS/SSL Handshake (For HTTPS)

    • Client and server negotiate cipher suites, authenticate digital certificates, and establish a symmetric session key for encrypted communication.

    Step 4: Browser Sends HTTP Request

    • The browser crafts and sends a formatted HTTP request message.
    GET /index.html HTTP/1.1
    Host: www.example.com
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
    Accept: text/html,application/xhtml+xml
    Accept-Language: en-US,en;q=0.9
    Connection: keep-alive
    

    Step 5: Server Processing and HTTP Response

    • The web server (e.g., Apache, Nginx) parses the request, executes server-side scripts (PHP/JSP/Servlets), queries databases if necessary, and returns an HTTP response message.
    HTTP/1.1 200 OK
    Date: Mon, 20 Aug 2026 12:00:00 GMT
    Server: Apache/2.4.52
    Content-Type: text/html; charset=UTF-8
    Content-Length: 1024
    Connection: keep-alive
    
    <!DOCTYPE html>
    <html>
      <head><title>Example</title></head>
      <body><h1>Welcome to Example!</h1></body>
    </html>
    

    Step 6: Rendering and Additional Asset Requests

    • The browser parses the received HTML. As it encounters linked assets (<link rel="stylesheet">, <script src="...">, <img src="...">), it sends parallel HTTP requests over persistent connections (HTTP Keep-Alive / HTTP/2 multiplexing) until the entire page is rendered.

    3. Key Components of HTTP Messages

    Component Request Message Response Message
    Initial Line Request Line (METHOD URL VERSION) Status Line (VERSION STATUS_CODE REASON)
    Headers Host, User-Agent, Accept, Cookie Content-Type, Content-Length, Set-Cookie
    Empty Line `\r
    ` separator `\r
    ` separator
    Body (Payload) Form data, JSON payload (for POST/PUT) HTML, CSS, JSON data, or binary image

    4. Common HTTP Status Codes

    • 200 OK: Request succeeded.
    • 301 Moved Permanently: Resource redirected to a new URL.
    • 400 Bad Request: Server could not parse the client request.
    • 404 Not Found: Requested URL does not exist.
    • 500 Internal Server Error: Server encountered an unexpected failure.
  18. Q4(a). Describe commonly used protocols like HTTP, FTP, SMTP, and POP. How does each protocol serve different purposes in web communications?20247m

    Module II: Browser and Apache Web Server Architecture

    Describe commonly used protocols like HTTP, FTP, SMTP, and POP. How does each protocol serve different purposes in web communications?

    View this question on its own page →
    Worked Solution

    Web protocols

    Protocols are agreed rules for communication. Each one below works at the application layer and typically runs over TCP.

    1. HTTP (HyperText Transfer Protocol)

    • Purpose: transfers web pages and resources between browser and web server.
    • Port: 80 (HTTPS = HTTP over TLS, port 443).
    • Model: request/response and stateless.
    • Methods: GET (retrieve), POST (submit), PUT (update), DELETE (remove), HEAD.
    • Status codes: 200 OK, 301 redirect, 404 Not Found, 500 Server Error.
    GET /index.html HTTP/1.1
    Host: www.example.com
    

    2. FTP (File Transfer Protocol)

    • Purpose: uploading and downloading files between a client and a server (e.g. publishing a site to a host).
    • Ports: 21 (control), 20 (data).
    • Uses two connections (control and data), needs username/password authentication, and is unencrypted (use SFTP or FTPS for security).

    3. SMTP (Simple Mail Transfer Protocol)

    • Purpose: sending email from a client to a mail server and between mail servers (push protocol).
    • Port: 25 (587 for submission with TLS).
    • Handles routing and delivery of the outgoing message.

    4. POP (Post Office Protocol, POP3)

    • Purpose: retrieving email from the server to the client (pull protocol).
    • Port: 110 (995 with SSL).
    • Downloads messages to the local device, and normally deletes them from the server. Simple, but less suited to multiple devices than IMAP.

    Comparison

    Protocol Purpose Port Direction
    HTTP Web pages/resources 80 / 443 Client ↔ web server
    FTP File transfer 20, 21 Client ↔ file server
    SMTP Send email 25 / 587 Client → server, server → server
    POP3 Receive email 110 / 995 Mail server → client

    Working together: the user browses with HTTP, uploads site files with FTP, sends mail through SMTP, and reads mail through POP3 (or IMAP).

  19. Q4(a). Draw the functional block diagram of a modern web browser and state the primary function of each subsystem.20267m

    Module II: Browser and Apache Web Server Architecture

    Draw the functional block diagram of a modern web browser and state the primary function of each subsystem.

    View this question on its own page →
    Worked Solution

    Functional Block Diagram of a Modern Web Browser

    A browser retrieves web resources, interprets web technologies and displays interactive pages.

    MermaidDiagram
    Rendering diagram…

    Subsystems

    1. User interface: tabs, address bar, bookmarks and navigation controls.
    2. Browser engine: coordinates UI, rendering and browser services.
    3. Rendering engine: parses HTML/CSS, computes layout and paints the page.
    4. JavaScript engine: executes scripts and interacts with the DOM and browser APIs.
    5. Networking: sends HTTP/HTTPS requests and receives resources.
    6. Graphics/UI backend: draws widgets, text, images and graphical output.
    7. Data storage: maintains cache, cookies, history and local/site storage.

    Working: The browser resolves a URL, requests the document, parses HTML into a DOM and CSS into style rules, computes layout and paints the result. It fetches referenced images, stylesheets and scripts; JavaScript can update the page after loading.

    Modern browsers often isolate tabs or sites into separate processes to improve stability and security.

  20. Q4(b). Compare Netscape Navigator and Internet Explorer in terms of their rendering engines, proprietary feature support, security models and historical impact on cross-browser compatibility and web standards.20267m

    Module II: Browser and Apache Web Server Architecture

    Compare Netscape Navigator and Internet Explorer in terms of their rendering engines, proprietary feature support, security models and historical impact on cross-browser compatibility and web standards.

    View this question on its own page →
    Worked Solution

    Netscape Navigator vs Internet Explorer

    Basis Netscape Navigator Internet Explorer (IE)
    Rendering engine Early versions used Netscape's own engine; later Mozilla development led to Gecko Major Windows versions used Microsoft's Trident engine
    Proprietary features Included Netscape-specific extensions and early web APIs Supported Microsoft-specific extensions and, in some versions, ActiveX
    Security Security evolved across versions; scripting and plug-ins introduced risks Windows integration and ActiveX expanded capabilities and potential attack surface
    Standards Differences in HTML/CSS/JavaScript behaviour caused compatibility issues Non-standard behaviours and version differences also caused compatibility issues
    Historical impact One of the first widely used graphical browsers Became dominant during the browser wars, partly through Windows integration

    During the browser wars, developers sometimes used browser detection and separate code paths because browsers interpreted HTML, CSS and JavaScript differently. Proprietary APIs and inconsistent standards support meant a page might work in one browser and fail in another.

    Competition helped popularize the Web but also fragmented it. Open standards, browser testing, progressive enhancement and later standardization efforts improved interoperability.

    Conclusion: Both browsers shaped early web development. Their differences demonstrate why standards compliance and cross-browser testing matter. Details varied by version, and both products are now historical.

  21. Q4a. What are the features and configuration steps of the Apache Tomcat server?20257m

    Module II: Browser and Apache Web Server Architecture

    What are the features and configuration steps of the Apache Tomcat server?

    View this question on its own page →
    Worked Solution

    Answer: Features and Configuration Steps of Apache Tomcat Server

    1. Overview of Apache Tomcat

    Apache Tomcat is an open-source web server and Java Servlet container developed by the Apache Software Foundation (ASF). It provides a pure Java HTTP web server environment in which Java code can run, implementing the Jakarta Servlet, Jakarta Server Pages (JSP), Jakarta Expression Language (EL), and WebSocket technologies.


    2. Key Features of Apache Tomcat

    1. Servlet & JSP Container: Implements modern Servlet and JSP specifications through its internal engines:
      • Catalina: The core Servlet engine.
      • Jasper: The JSP engine that compiles JSPs into Servlets.
      • Coyote: The HTTP connector supporting HTTP/1.1, HTTP/2, and AJP protocols.
    2. Lightweight & Fast: Highly optimized for Java enterprise web applications with low resource overhead.
    3. Cross-Platform: Pure Java implementation that runs seamlessly on Windows, Linux, macOS, and Unix.
    4. JNDI Resource Management: Supports enterprise connection pooling (e.g., MySQL, Oracle database DataSources).
    5. Clustering & Session Replication: Supports high availability and load balancing across multiple Tomcat instances.
    6. Embeddable: Can be embedded directly inside Java applications (commonly used in Spring Boot).

    3. Directory Structure of Tomcat

    Directory Description
    /bin Startup, shutdown, and control scripts (startup.bat/startup.sh, catalina.sh).
    /conf Core XML configuration files (server.xml, web.xml, tomcat-users.xml, context.xml).
    /lib Shared JAR libraries and JDBC drivers.
    /logs Server log files (catalina.out, localhost_access_log).
    /webapps Directory where web applications (.war files or unpacked directories) are deployed.
    /work Temporary work directory where compiled JSP servlets and temporary files are stored.

    4. Configuration Steps for Apache Tomcat

    Step 1: Install Prerequisites & Set Environment Variables

    Tomcat requires Java Development Kit (JDK 8+). Set environment variables in the OS:

    • JAVA_HOME: Path to JDK directory (e.g., C:\Program Files\Java\jdk-17 or /usr/lib/jvm/java-17-openjdk).
    • CATALINA_HOME: Path to the root Tomcat installation directory.
    • Add %CATALINA_HOME%\bin (or $CATALINA_HOME/bin) to the system PATH.

    Step 2: Configuring Server Ports (conf/server.xml)

    To change the default HTTP port (from 8080 to 80 or custom port):

    <!-- conf/server.xml -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               maxThreads="200" />
    

    Step 3: Configuring Admin Users and Roles (conf/tomcat-users.xml)

    To grant access to the Tomcat Web Application Manager GUI (http://localhost:8080/manager/html):

    <!-- conf/tomcat-users.xml -->
    <tomcat-users>
        <role rolename="manager-gui"/>
        <role rolename="admin-gui"/>
        <user username="admin" password="SecretPassword123" roles="manager-gui,admin-gui"/>
    </tomcat-users>
    

    Step 4: Global Web Application Settings (conf/web.xml)

    Configures default MIME types, default welcome files (index.html, index.jsp), and global session timeouts:

    <!-- conf/web.xml -->
    <session-config>
        <session-timeout>30</session-timeout> <!-- In minutes -->
    </session-config>
    
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    

    Step 5: Application Deployment & Server Management

    1. Deploying Applications:
      • Copy your .war archive (e.g., myapp.war) directly into the $CATALINA_HOME/webapps/ folder.
      • Tomcat automatically unpacks and deploys the application.
    2. Starting the Server:
      • On Windows: Run bin\startup.bat
      • On Linux/macOS: Run bin/startup.sh
    3. Verifying Installation:
      • Open browser at http://localhost:8080.
    4. Stopping the Server:
      • Run bin\shutdown.bat or bin/shutdown.sh.
  22. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  23. Q4b. Compare and contrast HTTP, FTP, SMTP, and POP protocols in terms of their purpose and functionality.20257m

    Module II: Browser and Apache Web Server Architecture

    Compare and contrast HTTP, FTP, SMTP, and POP protocols in terms of their purpose and functionality.

    View this question on its own page →
    Worked Solution

    Answer: Comparison of HTTP, FTP, SMTP, and POP Protocols

    1. Introduction

    HTTP, FTP, SMTP, and POP are fundamental Application Layer protocols in the TCP/IP suite. While they all rely on TCP for reliable, end-to-end data delivery, they are optimized for distinct purposes: web browsing, file management, email transmission, and email retrieval.

                            +---------------------------+
                            |  APPLICATION LAYER (TCP)  |
                            +-------------+-------------+
                                          |
             +----------------+-----------+-----------+----------------+
             |                |                       |                |
             v                v                       v                v
          +----+           +----+                  +----+           +----+
          |HTTP|           |FTP |                  |SMTP|           |POP3|
          +----+           +----+                  +----+           +----+
         (Web Pages)    (File Transfer)          (Send Mail)     (Receive Mail)
    

    2. Overview of Each Protocol

    1. HTTP (HyperText Transfer Protocol)

    • Purpose: Distributed, collaborative hypermedia information retrieval for the World Wide Web.
    • Port: Port 80 (HTTP), Port 443 (HTTPS with TLS).
    • Mechanism: Request-Response model between clients (browsers) and web servers.
    • Characteristics: Stateless (does not retain client context across requests without cookies/sessions); supports caching and content negotiation.

    2. FTP (File Transfer Protocol)

    • Purpose: Uploading, downloading, and managing files between a client and a remote server.
    • Port: Port 21 (Control Connection) and Port 20 (Data Connection in active mode).
    • Mechanism: Dual-channel architecture:
      • Control Connection: Sends authentication commands (USER, PASS, LIST).
      • Data Connection: Transfers raw file data.
    • Characteristics: Stateful session requiring explicit login authentication and directory navigation.

    3. SMTP (Simple Mail Transfer Protocol)

    • Purpose: Push-based email transmission from email client to mail server, and between intermediate Mail Transfer Agents (MTAs).
    • Port: Port 25 (Server-to-server relay), Port 587 (Client submission with STARTTLS), Port 465 (SMTPS).
    • Mechanism: Text-based command/response stream (HELO/EHLO, MAIL FROM, RCPT TO, DATA, QUIT).
    • Characteristics: Unidirectional push protocol; cannot retrieve emails from a server mailbox.

    4. POP3 (Post Office Protocol version 3)

    • Purpose: Pull-based email retrieval protocol allowing email clients (e.g., Outlook, Thunderbird) to download messages from a remote mail server.
    • Port: Port 110 (Plain POP3), Port 995 (POP3S over SSL/TLS).
    • Mechanism: Client authenticates (USER, PASS), lists messages (LIST), downloads message bodies (RETR), and marks messages for deletion (DELE).
    • Characteristics: Typically downloads emails to local storage and removes them from the server mailbox (unlike IMAP, which synchronizes in-place).

    3. Comprehensive Comparison Matrix

    Parameter HTTP FTP SMTP POP3
    Full Name HyperText Transfer Protocol File Transfer Protocol Simple Mail Transfer Protocol Post Office Protocol v3
    Primary Function Transferring web pages & APIs Uploading/downloading files Sending & relaying emails Downloading/retrieving emails
    Default Ports 80 (HTTP), 443 (HTTPS) 21 (Control), 20 (Data) 25 (Relay), 587 (Submission) 110 (Plain), 995 (SSL)
    Transport Protocol TCP TCP TCP TCP
    Architecture Client-Server Request/Response Dual-channel Client-Server Push (Client->Server, Server->Server) Pull (Client <- Server)
    Connection Model Single connection per request Two separate connections Single persistent TCP stream Single session per transaction
    Session State Stateless Stateful Stateful (during mail transaction) Stateful (during mailbox lock)
    Data Types Handled HTML, JSON, Images, Video Binary files, text files Plain text, MIME encoded email MIME encoded email messages
    Secure Variant HTTPS FTPS / SFTP SMTPS (TLS) POP3S (TLS)

    Conclusion

    Each protocol serves a targeted domain: HTTP delivers interactive web content, FTP enables robust bulk file synchronization, SMTP pushes outgoing emails across networks, and POP3 retrieves and downloads stored mailboxes to client machines.

  24. Q5(a). Describe the architecture and working of a web server with a neat diagram. Discuss the major features of the Apache Web Server.20267m

    Module II: Browser and Apache Web Server Architecture

    Describe the architecture and working of a web server with a neat diagram. Discuss the major features of the Apache Web Server.

    View this question on its own page →
    Worked Solution

    Web Server Architecture and Apache Features

    A web server receives HTTP/HTTPS requests from clients, locates or generates the requested resource, and returns an HTTP response. It can serve static files directly or pass dynamic requests to application runtimes.

    MermaidDiagram
    Rendering diagram…

    Working: The browser resolves the domain through DNS and opens a connection. For HTTPS, TLS protects the connection. The server parses the request, applies routing and access rules, reads a static resource or invokes application code, then sends a response containing a status code, headers and body.

    Major features of Apache HTTP Server

    1. Open source: widely used and extensible.
    2. Cross-platform: runs on Unix-like systems and Windows.
    3. Virtual hosting: hosts multiple sites on one server.
    4. Modules: functionality can be extended, for example with rewrite, TLS and proxy modules.
    5. Security controls: access control, authentication and TLS support when configured.
    6. URL rewriting and redirects: supports flexible routing and canonical URLs.
    7. Logging and configuration: configurable access/error logs and per-directory settings, including .htaccess where enabled.
    8. Proxying and load balancing: modules can route requests to backend applications.

    Conclusion: A web server is the HTTP entry point for a website. Apache is popular because it is flexible, modular and configurable; secure operation requires updates and careful configuration.

  25. Q5(b). Differentiate between HTTP and FTP based on their purpose, working principles and applications.20267m

    Module II: Browser and Apache Web Server Architecture

    Differentiate between HTTP and FTP based on their purpose, working principles and applications.

    View this question on its own page →
    Worked Solution

    HTTP vs FTP

    Basis HTTP FTP
    Full form Hypertext Transfer Protocol File Transfer Protocol
    Main purpose Transfer web resources and API data Transfer and manage files
    Typical use Web pages, images, APIs, downloads Uploading/downloading files to a server
    Connections Usually one connection for requests/responses; HTTP/2 and HTTP/3 improve multiplexing Traditionally separate control and data connections
    Operations GET, POST, PUT, DELETE and others Commands such as LIST, RETR and STOR
    Security HTTPS adds TLS encryption and authentication Plain FTP is unencrypted; FTPS adds TLS; SFTP uses SSH and is a different protocol
    Default ports HTTP 80; HTTPS 443 FTP control commonly 21; data behaviour varies by mode

    HTTP working: A client sends a request with a method, path, headers and sometimes a body. The server responds with a status code, headers and content. HTTP is stateless at the protocol level, though cookies and application sessions can preserve state.

    FTP working: A client authenticates to an FTP server and issues commands over a control connection. File data is transferred over a separate data connection, in active or passive mode.

    Applications: HTTP/HTTPS powers websites, web services and APIs. FTP has traditionally been used for file exchange and website publishing, though secure alternatives are preferred today.

    Conclusion: HTTP is optimized for web resource communication, whereas FTP is designed for file transfer and file-management operations.

  26. Q5b. Discuss the role and functions of rendering engines in modern browsers.20257m

    Module II: Browser and Apache Web Server Architecture

    Discuss the role and functions of rendering engines in modern browsers.

    View this question on its own page →
    Worked Solution

    Answer: Role and Functions of Rendering Engines in Modern Browsers

    1. What is a Rendering Engine?

    A rendering engine (also known as a layout engine) is the primary software component of a web browser responsible for interpreting HTML, XML, CSS, and embedded media assets, and translating that structured code into visual pixels painted onto the user's screen.

                   +---------------------------------------------+
                   |             RENDERING ENGINE                |
                   |                                             |
    HTML Source -> | [HTML Parser]  -->  DOM Tree  \             |
                   |                                 -> Render   | -> Layout -> Paint -> Screen
    CSS Source  -> | [CSS Parser]   -->  CSSOM Tree /    Tree    |  (Reflow)  (Raster)
                   +---------------------------------------------+
    

    2. Major Modern Rendering Engines

    Engine Developed By Used in Browsers
    Blink Google (Fork of WebKit) Google Chrome, Microsoft Edge, Brave, Opera, Vivaldi
    Gecko Mozilla Foundation Mozilla Firefox
    WebKit Apple Apple Safari, all iOS web browsers

    3. Core Functions of a Rendering Engine

    1. Document Parsing & Tree Construction

    • HTML Parsing & DOM Tree: Converts raw HTML byte streams into tokens, which are turned into nodes forming the hierarchical Document Object Model (DOM) tree.
    • CSS Parsing & CSSOM Tree: Parses CSS stylesheets (inline, external, and embedded) to construct the CSS Object Model (CSSOM) tree representing styling rules.

    2. Render Tree Construction (Frame Tree)

    • Merges the DOM tree and CSSOM tree into a Render Tree.
    • The Render Tree only includes nodes that are actually visible (e.g., <head>, <script>, and elements with display: none are omitted; elements with visibility: hidden are included).
    • Calculates computed styles (font sizes, colors, margins) for every visible element.

    3. Layout (Reflow) Process

    • Traverses the Render Tree to calculate the exact geometric coordinates, position (X,YX, Y), and dimensions (width, height) of every node relative to the viewport.
    • Handles box model metrics: margins, borders, padding, floats, flexbox, and CSS grid layouts.

    4. Painting (Rasterization)

    • Converts visual layout boxes into actual pixel data in memory.
    • Draws backgrounds, borders, text, colors, shadows, and images.
    • Elements are split into separate graphical layers (e.g., video, canvas, 3D transforms).

    5. Compositing (GPU Acceleration)

    • Modern rendering engines send individual graphical layers to the GPU (Graphics Processing Unit) for hardware-accelerated compositing.
    • The GPU composites layers in the correct stacking order (z-indexz\text{-index}) and displays the final raster image onto the physical screen without needing to re-layout the whole page.

    4. Key Performance Optimizations in Modern Engines

    1. Incremental / Asynchronous Rendering: Modern engines do not wait for the entire HTML document to download; they parse and display partial content incrementally to minimize First Contentful Paint (FCP).
    2. Minimizing Reflow & Repaint:
      • Reflow: Re-calculating geometric layout (expensive).
      • Repaint: Re-drawing color/visibility changes without altering geometry (lighter).
    3. Speculative Pre-parsing: While scripts are executing, a secondary scanner looks ahead in HTML to discover and prefetch external resources (CSS, JS, images).
    4. Hardware Acceleration: Offloads computationally heavy tasks (CSS animations, smooth scrolling, video playback) to dedicated graphics hardware.
  27. Q9(b). Write a short note on Configuration of Netscape Navigator. Question 9: attempt any two short notes.20267m

    Module II: Browser and Apache Web Server Architecture

    Write a short note on Configuration of Netscape Navigator. Question 9: attempt any two short notes.

    View this question on its own page →
    Worked Solution

    Short Note: Configuration of Netscape Navigator

    Netscape Navigator was a historical web browser. Its configuration options let users customize how it connected to websites and handled content.

    Important settings included:

    1. Home page: choose the page opened at startup.
    2. Connection/proxy: configure direct access or proxy settings for an organization's network.
    3. Cache: manage temporary files used to speed up repeat visits.
    4. Cookies and privacy: control site data and privacy-related behaviour, depending on version.
    5. Security: manage certificates and permissions for scripts or other active content where supported.
    6. Appearance: configure fonts, colours and language preferences.
    7. Mail/news integration: configure associated mail or news services in versions that included them.

    Exact menus and features differed by release and operating system. Administrators needed to balance convenience with security and compatibility.

    Conclusion: Browser configuration affects navigation, connectivity, privacy, security and presentation. Netscape is now a historical browser, so its options should be understood in their version-specific context.

  28. Q9(c). Write a short note on Simple Mail Transfer Protocol (SMTP). Question 9: attempt any two short notes.20267m

    Module II: Browser and Apache Web Server Architecture

    Write a short note on Simple Mail Transfer Protocol (SMTP). Question 9: attempt any two short notes.

    View this question on its own page →
    Worked Solution

    Short Note: Simple Mail Transfer Protocol (SMTP)

    SMTP stands for Simple Mail Transfer Protocol. It is an application-layer protocol used to send email from a mail client to an outgoing mail server and to relay messages between mail servers.

    Working

    1. The sender composes a message in a mail application.
    2. The client submits it to an outgoing mail server, commonly using authenticated submission on port 587 with STARTTLS or implicit TLS on port 465.
    3. The sending server looks up the recipient domain's MX record in DNS.
    4. It relays the message to the recipient's mail server, commonly using port 25 between servers.
    5. The recipient retrieves the message using IMAP or POP; SMTP is primarily for sending and relaying, not mailbox retrieval.

    Basic commands include EHLO/HELO, MAIL FROM, RCPT TO, DATA and QUIT.

    Advantages: standardized mail transfer, store-and-forward delivery, and support for relaying between different providers.

    Limitations: SMTP alone does not guarantee confidentiality or prevent spoofing. TLS, authentication, SPF, DKIM and DMARC help secure transport and improve domain-level anti-spoofing.

    Conclusion: SMTP is the standard protocol for sending and relaying email, while IMAP and POP are commonly used to access received messages.

  29. Q9b. What are the main configuration settings required for browsers such as Netscape and Internet Explorer (IE)?20257m

    Module II: Browser and Apache Web Server Architecture

    What are the main configuration settings required for browsers such as Netscape and Internet Explorer (IE)?

    View this question on its own page →
    Worked Solution

    Answer: Configuration Settings in Classic Browsers (Netscape and Internet Explorer)

    1. Overview

    Web browsers such as Netscape Navigator / Communicator and Microsoft Internet Explorer (IE) established the foundational configuration architectures for client-side web navigation, network proxies, security zones, and MIME content handling.


    2. Main Configuration Categories

    +-----------------------------------------------------------------------+
    |                    BROWSER CONFIGURATION SUBSYSTEMS                   |
    +-------------------+-------------------+---------------+---------------+
    | 1. Network/Proxy  | 2. Security Zones | 3. Content    | 4. Cache &    |
    |    Settings       |    & SSL/TLS      |    & MIME     |    Privacy    |
    | - HTTP/FTP Proxy  | - Active Scripting| - Helper Apps | - Cookie Rules|
    | - Port Mapping    | - ActiveX Controls| - Java/Plugins| - Disk Quota  |
    +-------------------+-------------------+---------------+---------------+
    

    1. Network & Proxy Connection Settings

    • Direct vs. Proxy Connections: Configuring proxy servers for HTTP, Secure (HTTPS), FTP, and SOCKS connections to route internet traffic through institutional firewalls or cache gateways.
    • Automatic Configuration (PAC): Configuring an Automatic Proxy Configuration Script URL (wpad.dat / .pac file) or WPAD (Web Proxy Auto-Discovery Protocol).
    • Proxy Exceptions: Specifying local IP ranges and intranet domains (localhost, *.internal.net) to bypass proxy routing.

    2. Security Zones and Scripting Permissions

    • Security Zones (Distinct in Internet Explorer):
      • Internet Zone: Default restricted sandbox for untrusted public websites.
      • Local Intranet Zone: Lower security settings for internal enterprise networks.
      • Trusted Sites Zone: Elevated privileges for verified partner portals.
      • Restricted Sites Zone: Maximum security restrictions for unsafe sites.
    • Active Scripting & Controls:
      • Toggling JavaScript / VBScript execution.
      • Enabling or prompting for signed/unsigned ActiveX Controls (in IE) and Java Applets.
    • Cryptographic Protocols: Enabling SSL 2.0/3.0 and modern TLS protocols for secure HTTPS transactions.

    3. Content Handlers and MIME Type Associations

    • Helper Applications (Major feature in Netscape): Mapping specific MIME types (e.g., application/pdf, audio/x-wav, video/quicktime) to external standalone viewer applications or internal browser plug-ins.
    • File Download Handling: Defining automated actions when downloading file extensions (Prompt user, Save to disk, or Launch helper app).

    4. Cache and Temporary Internet Files Management

    • Disk Cache Allocation: Allocating disk storage limits (e.g., 50MB to 500MB) to store cached web assets (HTML, stylesheets, images).
    • Page Verification Frequency: Setting when the browser checks the server for newer page versions:
      • Every visit to the page
      • Every time the browser is started
      • Automatically
      • Never (offline mode)
    • Cache Purging: Options to clear history, form autofill, and temporary internet files on browser exit.

    5. Privacy, Cookies, and Identity

    • Cookie Management: Granular policies for accepting, prompting, or blocking First-Party and Third-Party tracking cookies.
    • Personal Certificate Management: Importing and managing client-side X.509 digital certificates for secure client authentication.

    3. Netscape vs. Internet Explorer Configuration Architecture

    Feature Netscape Navigator Microsoft Internet Explorer
    Storage Mechanism Plaintext JavaScript configuration file (prefs.js / all.js) Windows Registry (HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings)
    Configuration GUI Edit > Preferences Menu Tools > Internet Options (Control Panel)
    Security Architecture Java Permissions & Security Capabilities API Security Zones (Internet, Intranet, Trusted, Restricted)
    Extensibility Model Netscape Plugin API (NPAPI) ActiveX Controls, COM components, BHOs
    Enterprise Policy Centralized netscape.cfg deployment Group Policy Objects (GPO) via Active Directory