Web Technology

Back to Web Technology

Module II: Browser & Apache Web Server Architecture; Common Protocols

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

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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).
  2. 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 & Apache Web Server Architecture; Common Protocols

    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.
  3. 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 & Apache Web Server Architecture; Common Protocols

    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.
  4. 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 & Apache Web Server Architecture; Common Protocols

    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.
  5. Q1e. Which of the following is an open-source web server software? (i) IIS (ii) Apache (iii) Nginx (iv) Tomcat20252m

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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.
  6. 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 & Apache Web Server Architecture; Common Protocols

    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).
  7. 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 & Apache Web Server Architecture; Common Protocols

    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.
  8. Q3a. Describe the architecture of a web browser and explain its major components.20257m

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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.
  9. Q3b. Explain how a web browser interacts with a web server using the HTTP request-response model.20257m

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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.
  10. Q4a. What are the features and configuration steps of the Apache Tomcat server?20257m

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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.
  11. Q4b. Compare and contrast HTTP, FTP, SMTP, and POP protocols in terms of their purpose and functionality.20257m

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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.

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

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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.
  13. Q9b. What are the main configuration settings required for browsers such as Netscape and Internet Explorer (IE)?20257m

    Module II: Browser & Apache Web Server Architecture; Common Protocols

    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