1 What is the primary difference between horizontal scaling and vertical scaling in web application infrastructure? A Horizontal scaling adds more machine instances or nodes to distribute load, while vertical scaling adds more CPU, RAM, or resources to a single existing machine. B Vertical scaling means adding servers in different countries, while horizontal is local. C Horizontal scaling is strictly for databases, while vertical scaling is for frontends. D Vertical scaling requires Kubernetes, while horizontal scaling does not.
View answer & explanationFull Screen Mode →
2 In web API design, what is 'Idempotency Key' used for in payment or transactional endpoints? A To encrypt credit card numbers before database storage. B A unique client-provided header that allows the server to recognize repeated identical requests (e.g. on network retries) and avoid duplicate charges or operations. C To generate user passwords during account creation. D To track user affiliate marketing referrals.
View answer & explanationFull Screen Mode →
3 What does the `X-Frame-Options: DENY` HTTP header accomplish? A It blocks video frames from rendering in canvas elements. B It completely prevents the web page from being rendered inside a `<frame>`, `<iframe>`, `<embed>`, or `<object>`, mitigating Clickjacking attacks. C It disables all CSS keyframe animations. D It restricts network requests to the top-level window frame.
View answer & explanationFull Screen Mode →
4 Which HTTP security header forces browsers to only communicate with a domain over HTTPS, preventing SSL stripping attacks? A Strict-Transport-Security (HSTS) B Content-Security-Policy (CSP) C X-Frame-Options D Access-Control-Allow-Origin
View answer & explanationFull Screen Mode →
5 What is the purpose of the `Transfer-Encoding: chunked` header in HTTP/1.1? A To compress images into WebP format on transmission. B To stream response data in dynamically sized chunks when the total content length is not known in advance. C To split large cookies across multiple HTTP headers. D To encrypt data packets individually with separate SSL keys.
View answer & explanationFull Screen Mode →
6 What is the main benefit of using a database Connection Pool on a backend web server? A It maintains a cache of pre-established database connections that can be reused for incoming requests, avoiding the latency and overhead of opening new connections repeatedly. B It automatically converts relational tables into JSON documents. C It disables database logging to maximize write speeds. D It encrypts all database columns on disk.
View answer & explanationFull Screen Mode →
7 What is database 'Sharding'? A Duplicating an entire database across multiple read replicas. B Horizontally partitioning large database tables across multiple independent physical database instances based on a shard key. C Deleting expired rows from cache tables periodically. D Encrypting database tables with asymmetric RSA keys.
View answer & explanationFull Screen Mode →
8 In database transactions, what does the 'I' in the ACID acronym stand for? A Inheritance B Isolation C Immutability D Iteration
View answer & explanationFull Screen Mode →
9 What is the purpose of the `Subresource Integrity` (SRI) attribute on `<script>` or `<link>` tags? A To enable hardware acceleration for third-party scripts. B To ensure that files fetched from third-party CDNs have not been maliciously modified or tampered with, by verifying a cryptographic hash. C To allow scripts to bypass CORS security policies. D To measure download latency of CDN scripts.
View answer & explanationFull Screen Mode →
10 What is the purpose of the `X-Content-Type-Options: nosniff` HTTP header? A To prevent browsers from MIME-type sniffing a response away from the declared `Content-Type`, mitigating script injection attacks via disguised files. B To disable browser spell check on input fields. C To prevent search engines from indexing the web page. D To block network traffic analyzers like Wireshark.
View answer & explanationFull Screen Mode →
11 What is Blue-Green Deployment in web application infrastructure? A A deployment strategy where half of users see light mode and half see dark mode. B A zero-downtime release technique using two identical production environments ('Blue' running current version, 'Green' running new version) where router traffic switches to Green once verified. C A method of deploying web applications exclusively using green renewable solar energy. D Deploying frontend and backend to two different cloud vendors.
View answer & explanationFull Screen Mode →
12 What is the role of an `ETag` (Entity Tag) HTTP header in conditional caching? A It represents a unique identifier/hash of the resource version; clients send it back in `If-None-Match` to check if content changed, receiving a lightweight `304 Not Modified` if unchanged. B It tags HTML elements for screen reader accessibility. C It encodes user payment credentials. D It provides a timestamp for server CPU uptime.
View answer & explanationFull Screen Mode →
13 What does the HTTP header `Cache-Control: no-cache` specify to browsers and intermediate caches? A The resource must never be saved to any cache storage. B The response may be cached, but the cache must revalidate with the origin server (e.g. using `ETag`) before serving the cached copy. C The resource will be cached for exactly one year. D The response can only be cached on mobile phones.
View answer & explanationFull Screen Mode →
14 How does a Content Delivery Network (CDN) improve web performance for global audiences? A By increasing the processing clock speed of the user's computer. B By caching static assets (HTML, CSS, JS, images) across globally distributed edge servers geographically close to end users, reducing latency. C By compressing relational database tables in the cloud. D By bypassing browser security policies for faster download.
View answer & explanationFull Screen Mode →
15 What is the primary objective of Continuous Integration (CI) in modern web development? A To deploy code directly to live production without running tests. B To automatically build, lint, and run automated test suites whenever developers merge or push code changes to a shared repository. C To compile JavaScript code into assembly language. D To generate automated invoices for clients.
View answer & explanationFull Screen Mode →
16 In containerization, what is the difference between a Docker Image and a Docker Container? A An image is a running instance, while a container is a static text file. B An image is an immutable snapshot/template of application code and environment, while a container is a live, running instance of that image. C Docker images run only on Windows, while containers run on Linux. D Images are stored in RAM, while containers exist on physical disks.
View answer & explanationFull Screen Mode →
17 What is the difference between a Forward Proxy and a Reverse Proxy? A A forward proxy sits in front of clients to regulate/protect outbound traffic to the internet, while a reverse proxy sits in front of servers to protect and route inbound traffic. B A forward proxy only supports HTTPS, whereas a reverse proxy only supports HTTP. C A reverse proxy is installed inside client browser settings, while a forward proxy is server-side only. D There is no functional difference; they are interchangeable terms.
View answer & explanationFull Screen Mode →
18 What is the function of a Reverse Proxy (such as Nginx or HAProxy) positioned in front of web application servers? A To compile client React components on the fly. B To handle SSL termination, load balance client requests across backend instances, provide caching, and protect internal servers from direct public exposure. C To run automated browser tests on client devices. D To provide client-side local storage synchronization.
View answer & explanationFull Screen Mode →
19 What is a 'Webhook' in web development? A A browser hook used to catch mouse scroll events. B An automated HTTP POST callback sent from one service to another when a specific event occurs (e.g. payment completed in Stripe). C A malicious script that redirects users to phishing sites. D A tool used to link CSS stylesheets to HTML headers.
View answer & explanationFull Screen Mode →
20 What is the primary role of Redis in a modern web application architecture? A A relational database used to store large disk-based archival backups. B An in-memory key-value data store frequently used for ultra-fast caching, session storage, and pub/sub messaging. C A frontend CSS framework. D A web server that compiles TypeScript into JavaScript.
View answer & explanationFull Screen Mode →
21 In a backend database, what is the trade-off of creating multiple indexes on a table? A `SELECT` read queries become faster, but `INSERT`, `UPDATE`, and `DELETE` write operations become slower due to index maintenance overhead. B The database can no longer execute relational joins. C Write operations become instantaneous, but reads require table scans. D All table columns are converted to string data types.
View answer & explanationFull Screen Mode →
22 In GraphQL, what are the three root operation types defined in a schema? A GET, POST, DELETE B Query, Mutation, Subscription C Select, Insert, Trigger D Fetch, Commit, Watch
View answer & explanationFull Screen Mode →
23 What problem common in REST APIs does GraphQL primarily solve? A Over-fetching (getting more data than needed) and under-fetching (needing multiple round trips to different endpoints for related data). B Lack of SSL encryption in HTTP requests. C High database CPU usage during table indexing. D Difficulty in rendering HTML templates on mobile devices.
View answer & explanationFull Screen Mode →
24 How do Server-Sent Events (SSE) differ from WebSockets? A SSE provides unidirectional (server-to-client only) streaming over standard HTTP, while WebSockets provide full bidirectional communication. B SSE is faster because it uses raw UDP packets. C SSE requires installing external C++ browser plugins. D WebSockets can only transfer plain text, whereas SSE only transfers video.
View answer & explanationFull Screen Mode →
25 What is the primary communication characteristic of WebSockets compared to traditional HTTP requests? A WebSockets only allow client-to-server communication. B WebSockets establish a full-duplex, bidirectional, persistent connection allowing server and client to send messages in real time with minimal overhead. C WebSockets require re-establishing a TCP connection for every single message. D WebSockets only support XML data format.
View answer & explanationFull Screen Mode →
26 What transport layer protocol does HTTP/3 utilize instead of TCP? A QUIC over UDP B WebSockets over TLS C FTP over SSH D SCTP over IP
View answer & explanationFull Screen Mode →
27 What is a major advantage of HTTP/2 over HTTP/1.1? A HTTP/2 sends data in plain ASCII text rather than binary framing. B HTTP/2 supports multiplexing multiple concurrent requests and responses over a single TCP connection, eliminating head-of-line blocking at the application layer. C HTTP/2 eliminates the need for DNS servers. D HTTP/2 only works over UDP sockets.
View answer & explanationFull Screen Mode →
28 In the TLS/SSL handshake used by HTTPS, how are asymmetric and symmetric encryption utilized together? A Asymmetric encryption is used for everything because it is faster than symmetric encryption. B Asymmetric encryption is used during the handshake to authenticate the server and securely exchange a shared secret; symmetric encryption then encrypts actual session data. C Symmetric encryption is used to authenticate the certificate, while asymmetric encryption compresses images. D TLS only uses symmetric encryption without keys.
View answer & explanationFull Screen Mode →
29 Why should password hashing algorithms like `bcrypt` or `Argon2` be used instead of standard fast cryptographic hashes like `SHA-256`? A `SHA-256` is an unencrypted plaintext format. B `bcrypt` and `Argon2` are intentionally slow, resource-intensive, and incorporate automatic salting to make brute-force and GPU dictionary attacks impractical. C `SHA-256` cannot be run on Linux servers. D `bcrypt` hashes can be easily decrypted by server administrators.
View answer & explanationFull Screen Mode →
30 How do Parameterized Queries (Prepared Statements) prevent SQL Injection attacks? A They convert all SQL statements into MongoDB NoSQL format. B They treat user input strictly as literal data parameters rather than executable SQL code, preventing input from altering SQL query structure. C They encrypt the entire database table using SHA-256. D They disable `SELECT` and `DROP` statements for standard users.
View answer & explanationFull Screen Mode →
31 Why is storing JWT authentication tokens in browser `localStorage` considered a security risk? A `localStorage` data is wiped automatically every 5 minutes. B Any malicious JavaScript running on the page (via an XSS vulnerability) can easily access and steal tokens stored in `localStorage`. C `localStorage` can only hold numerical values. D `localStorage` is automatically transmitted to third-party ad networks.
View answer & explanationFull Screen Mode →
32 What are the three components of a JSON Web Token (JWT) separated by periods (`.`)? A Header, Payload, Signature B Username, Password, Hash C Algorithm, Body, Checksum D Issuer, Audience, Secret
View answer & explanationFull Screen Mode →
33 Why should sensitive authentication session cookies always have the `HttpOnly` flag set? A To force the cookie to be transmitted only across HTTP and never HTTPS. B To prevent client-side JavaScript (e.g. `document.cookie`) from accessing the cookie, protecting it from being stolen via XSS. C To make the cookie readable across all subdomains automatically. D To instruct the browser to store the cookie in local storage.
View answer & explanationFull Screen Mode →
34 What does the `SameSite=Strict` cookie attribute do to protect against CSRF attacks? A It prevents the cookie from ever being sent with any cross-site requests (including standard top-level inbound link navigations). B It encrypts the cookie using AES-256 before writing to disk. C It makes the cookie expire in exactly 60 seconds. D It allows cookies to be read only by Google Chrome.
View answer & explanationFull Screen Mode →
35 What is Cross-Site Request Forgery (CSRF)? A Stealing passwords by injecting keyloggers into input tags. B An attack that tricks an authenticated user's browser into executing unwanted actions on a trusted web application where the user is currently authenticated. C Intercepting database traffic through SQL injection. D Creating fake SSL certificates for malicious domains.
View answer & explanationFull Screen Mode →
36 What is the primary purpose of a Content Security Policy (CSP) HTTP response header? A To enforce strict typing in client-side JavaScript code. B To restrict the sources and domains from which browsers are allowed to load and execute scripts, styles, images, and other resources, mitigating XSS attacks. C To compress HTTP response payloads using Brotli algorithm. D To manage user authentication sessions on the server.
View answer & explanationFull Screen Mode →
37 What is Cross-Site Scripting (XSS)? A An attack where unauthorized commands are transmitted from a user that the web application trusts. B A vulnerability that allows an attacker to inject malicious client-side scripts into web pages viewed by other users. C An attack that floods the server with fake TCP handshake requests. D A technique that intercepts encrypted HTTPS packets across public Wi-Fi.
View answer & explanationFull Screen Mode →
38 What is a CORS 'Preflight' request in web browsers? A A WebSocket handshake initiated before loading CSS. B An automatic HTTP `OPTIONS` request sent by the browser before complex cross-origin requests to check permissions. C A DNS lookup query performed before connecting to a web server. D A client-side security test to verify valid SSL certificates.
View answer & explanationFull Screen Mode →
39 According to the browser's Same-Origin Policy (SOP), two URLs share the same origin only if which three components match exactly? A Protocol (scheme), Hostname (domain), and Port number B Hostname, Pathname, and URL Query parameters C Protocol, IP address, and SSL Certificate Issuer D Domain name, Subdomain, and Cookie path
View answer & explanationFull Screen Mode →
40 In `package.json`, what does the caret (`^`) symbol prefix mean for a dependency version like `^1.4.2`? A Install exactly version 1.4.2 and never update. B Allow updates to minor and patch releases (e.g. `< 2.0.0` and `>= 1.4.2`) without allowing major breaking version changes. C Allow only patch release updates (e.g., `1.4.x`). D Always install the latest major version available.
View answer & explanationFull Screen Mode →
41 What is the primary function of `package-lock.json` in a Node.js project? A To prevent unauthorized developers from editing `package.json`. B To lock the exact dependency tree (including nested sub-dependencies and checksums) so builds are completely reproducible across environments. C To encrypt private API keys before committing to Git. D To compile Node.js modules into native C++ binaries.
View answer & explanationFull Screen Mode →
42 How many arguments must an Express.js error-handling middleware function define in its signature to be recognized by Express? A 2 arguments: `(req, res)` B 3 arguments: `(req, res, next)` C 4 arguments: `(err, req, res, next)` D 1 argument: `(error)`
View answer & explanationFull Screen Mode →
43 In Express.js middleware, what happens if a middleware function fails to either call `next()` or send a response (e.g. `res.send()`)? A Express throws an unhandled middleware exception. B The client request will hang indefinitely until the client or server socket times out. C The request is automatically forwarded to the 404 route. D The server restarts automatically.
View answer & explanationFull Screen Mode →
44 What C++ library powers the asynchronous, non-blocking I/O event loop and thread pool in Node.js? A libuv B Boost.Asio C V8 Engine D glibc
View answer & explanationFull Screen Mode →
45 According to RESTful API best practices, how should resource endpoints be named? A Using action verbs such as `/getUser` or `/deleteProduct`. B Using plural nouns representing resources (e.g., `/users`, `/products/123`) combined with standard HTTP verbs for actions. C Using file extensions (e.g., `/users.json`, `/products.xml`). D Using database table query strings directly (e.g., `/query?select=*`).
View answer & explanationFull Screen Mode →
46 Which HTTP status code is sent by a server to inform the client that it has sent too many requests in a given amount of time (rate limiting)? A 408 Request Timeout B 429 Too Many Requests C 503 Service Unavailable D 413 Payload Too Large
View answer & explanationFull Screen Mode →
47 What is the key difference between HTTP `401 Unauthorized` and `403 Forbidden` status codes? A `401` implies the user's identity is unauthenticated (missing or invalid credentials), while `403` means identity is known but the user lacks permission to access the resource. B `401` is a server error, while `403` is a network gateway error. C `403` requests can be resolved by resubmitting credentials, whereas `401` blocks the IP permanently. D `401` only applies to HTTPS requests.
View answer & explanationFull Screen Mode →
48 What does an HTTP `204 No Content` status code convey to the client? A The server encountered an error and cannot return data. B The request succeeded, but the server intentionally returns no response body (commonly used for DELETE or OPTIONS). C The requested URL could not be found. D The client is unauthorized to view the response body.
View answer & explanationFull Screen Mode →
49 Which HTTP status code signifies that a resource was successfully created on the server following a `POST` request? A 200 OK B 201 Created C 204 No Content D 202 Accepted
View answer & explanationFull Screen Mode →
50 Which HTTP request method is considered idempotent, meaning making multiple identical requests has the same outcome as making a single request? A POST B PUT C PATCH (in non-standard custom implementations) D CONNECT
View answer & explanationFull Screen Mode →