Questions: Web Technologies
Back to Topics List

Web Technologies Questions

Page 9 of 13 (Displaying Questions 801 – 900 of 1207 Total)

801. What is `Feature Detection` vs. `Browser Sniffing`?

Show Answer

Feature detection checks if a specific API or property exists. Browser sniffing checks the user-agent string to identify the browser, which is unreliable and discouraged.

Added: Nov 30, 2025

802. What is the `User-Agent Client Hints` standard?

Show Answer

A modern replacement for the traditional User-Agent string, providing developers with more privacy-preserving and structured access to browser/device information.

Added: Nov 30, 2025

803. Explain the `Intersection Observer API` in detail.

Show Answer

An API that provides an asynchronous and performant way to observe changes in the intersection of a target element with an ancestor element or the top-level viewport.

Added: Nov 30, 2025

804. What is the `Resize Observer API`?

Show Answer

An API that allows developers to efficiently track changes to the size of an element's content or border box, often used for dynamic layout adjustments.

Added: Nov 30, 2025

805. What is the JavaScript `Symbol` primitive type?

Show Answer

A unique and immutable data type, often used to create unique object property keys that are guaranteed not to clash with keys from other code.

Added: Nov 30, 2025

806. What are `Well-Known Symbols`?

Show Answer

Built-in symbols (like `Symbol.iterator`, `Symbol.toStringTag`) that are used by JavaScript engines to define and access internal language behaviors.

Added: Nov 30, 2025

807. What is the `new.target` property?

Show Answer

A meta-property available inside functions and constructors that tells you whether the function was called with the `new` keyword, used for implementing abstract classes.

Added: Nov 30, 2025

808. Explain the `try...catch...finally` block behavior with respect to the `finally` block.

Show Answer

The `finally` block always executes, regardless of whether an exception was thrown or caught in the `try` or `catch` blocks.

Added: Nov 30, 2025

809. What is a `First-Class Function`?

Show Answer

A language feature where functions are treated as first-class citizens, meaning they can be assigned to variables, passed as arguments, and returned from other functions.

Added: Nov 30, 2025

810. What is the `Singleton Pattern` in JavaScript?

Show Answer

A design pattern that restricts the instantiation of a class to a single object, ensuring that only one instance of the object exists throughout the application.

Added: Nov 30, 2025

811. Explain the `Revealing Module Pattern`.

Show Answer

A JavaScript design pattern that encapsulates all private members and exposes only the public parts of the module through a returned object literal, ensuring clear separation.

Added: Nov 30, 2025

812. What is `Currying` in JavaScript?

Show Answer

A technique of transforming a function that takes multiple arguments into a sequence of functions, each taking a single argument.

Added: Nov 30, 2025

813. What is the `Flux` architecture pattern?

Show Answer

An application architecture (popularized by React) that enforces a unidirectional data flow (View -> Action -> Dispatcher -> Store -> View), simplifying state management.

Added: Nov 30, 2025

814. What is the benefit of `Immutable Data Structures` in state management?

Show Answer

They simplify change detection (by reference comparison) and ensure predictable state updates, which reduces complexity and improves performance in rendering.

Added: Nov 30, 2025

815. What is the `Serverless` computing model?

Show Answer

A cloud execution model where the cloud provider dynamically manages the server resources (provisioning, scaling, maintenance), allowing the developer to focus only on writing code.

Added: Nov 30, 2025

816. What is `FaaS (Function as a Service)`?

Show Answer

A category of cloud computing that provides a platform allowing customers to develop, run, and manage application functionalities without the complexity of building and maintaining the infrastructure.

Added: Nov 30, 2025

817. What are `cold starts` in Serverless functions?

Show Answer

The latency incurred when a serverless function that has been idle needs to be provisioned and initialized (loading runtime, code, and configuration) before it can handle a request.

Added: Nov 30, 2025

818. Explain the `Backend as a Service (BaaS)` model.

Show Answer

A cloud service model that provides ready-made backend services (user management, databases, file storage) allowing frontend developers to focus solely on the client-side code.

Added: Nov 30, 2025

819. What is the `Jamstack` architecture?

Show Answer

A modern web development architecture based on client-side JavaScript, reusable APIs, and prebuilt Markup, emphasizing speed, security, and scalability.

Added: Nov 30, 2025

820. What is `Incremental Static Regeneration (ISR)`?

Show Answer

A rendering method that allows for the building of static pages at build time, but also enables them to be re-rendered (regenerated) on demand or at timed intervals, blending SSG and SSR.

Added: Nov 30, 2025

821. What is `Edge Functions`?

Show Answer

Serverless functions that run at the Content Delivery Network (CDN) edge locations, closer to the user, reducing latency for dynamic content and personalized responses.

Added: Nov 30, 2025

822. What is `Digital Accessibility`?

Show Answer

The practice of ensuring that digital content (websites, apps) can be easily perceived, operated, and understood by people with disabilities.

Added: Nov 30, 2025

823. What are the four principles of WCAG?

Show Answer

Perceivable, Operable, Understandable, and Robust (P.O.U.R.).

Added: Nov 30, 2025

824. What is the `tabindex` attribute used for in accessibility?

Show Answer

It modifies the tab order of elements and allows non-interactive elements to be focusable, primarily for keyboard navigation.

Added: Nov 30, 2025

825. What is the purpose of `aria-labelledby`?

Show Answer

An ARIA attribute used to associate a non-interactive element (like a custom control) with the label provided by another element on the page, improving context for screen readers.

Added: Nov 30, 2025

826. How do you correctly hide an element visually while keeping it available for screen readers?

Show Answer

By using an accessibility class with CSS properties like `clip: rect(0 0 0 0);`, `width: 1px;`, `height: 1px;`, and `overflow: hidden;`.

Added: Nov 30, 2025

827. What is `Color Contrast Ratio` and its WCAG requirement?

Show Answer

The difference in luminance between the foreground text color and the background color. WCAG requires a minimum ratio of 4.5:1 for normal text.

Added: Nov 30, 2025

828. What is the `Web Performance Budget`?

Show Answer

A set of measurable constraints on the size, quantity, and load time of assets (like JavaScript, images) that the development team agrees not to exceed to maintain performance goals.

Added: Nov 30, 2025

829. What is the `Speed Index` performance metric?

Show Answer

A metric that measures how quickly the contents of a page are visibly populated, with a lower score being better.

Added: Nov 30, 2025

830. Explain the concept of `Taint Checking` in security.

Show Answer

A technique where data from an untrusted source is "tainted" to prevent it from being used in sensitive sinks (like `eval()` or database queries) unless it is properly sanitized.

Added: Nov 30, 2025

831. What is a `security sandbox`?

Show Answer

A security mechanism that isolates running programs, restricting the resources (like file systems or network access) that the application can access.

Added: Nov 30, 2025

832. What is `OWASP Top 10`?

Show Answer

A standard awareness document for developers and web application security, representing a broad consensus about the most critical security risks to web applications.

Added: Nov 30, 2025

833. What is the difference between `Symmetric` and `Asymmetric` encryption?

Show Answer

Symmetric uses a single secret key for both encryption and decryption. Asymmetric uses a pair of public and private keys for security.

Added: Nov 30, 2025

834. What is a `Key Derivation Function (KDF)`?

Show Answer

A cryptographic hash function that derives one or more secret keys from a secret value, like a password or master key, used to make dictionary attacks harder.

Added: Nov 30, 2025

835. How do you handle secrets (API keys, tokens) in a serverless function?

Show Answer

By storing them in secure, centralized secret management services (like AWS Secrets Manager or Azure Key Vault) and retrieving them at runtime.

Added: Nov 30, 2025

836. What is the `Adapter Pattern` (or Wrapper) in JavaScript design?

Show Answer

A structural pattern that converts the interface of a class into another interface that clients expect, allowing classes with incompatible interfaces to work together.

Added: Nov 30, 2025

837. Explain the `Facade Pattern`.

Show Answer

A structural pattern that provides a simplified interface to a large body of code (a library or subsystem), shielding the client from the complexity of the internal components.

Added: Nov 30, 2025

838. What is the `Decorator Pattern` in JavaScript?

Show Answer

A structural pattern that dynamically attaches additional responsibilities to an object, providing a flexible alternative to subclassing for extending functionality.

Added: Nov 30, 2025

839. What is `Dependency Injection (DI)`?

Show Answer

A design pattern where components receive their dependencies from an external source (like a framework or container) rather than creating them themselves, increasing modularity and testability.

Added: Nov 30, 2025

840. What is the concept of a `Render Prop` pattern?

Show Answer

A component-based pattern where a component takes a function (the render prop) as a prop, which it calls to determine what to render, enabling sharing of stateful logic.

Added: Nov 30, 2025

841. Explain the purpose of `React Hooks` (conceptually).

Show Answer

A feature that allows functional components to "hook into" (use) state and lifecycle features without needing to convert them to class components, promoting reuse of stateful logic.

Added: Nov 30, 2025

842. What are `memoized selectors` (e.g., Reselect) used for in state management?

Show Answer

They prevent unnecessary recalculations of derived data when the input state has not changed, improving performance in complex state trees.

Added: Nov 30, 2025

843. What is the benefit of `server-side rendering (SSR)` over client-side rendering (CSR)?

Show Answer

SSR provides faster First Contentful Paint (FCP) and better SEO, as the initial HTML is fully formed and crawlable by search engines.

Added: Nov 30, 2025

844. What is the `Web Worker` limit?

Show Answer

There is generally no formal specification limit, but modern browsers typically limit the number of active workers to around 20 for performance reasons, with more being queued.

Added: Nov 30, 2025

845. How do you pass data between a Service Worker and the main thread?

Show Answer

Using the `postMessage()` method via the `MessageChannel` or the Service Worker's registration object.

Added: Nov 30, 2025

846. What is the purpose of the `Notification.permission` property?

Show Answer

It provides the current permission status for displaying notifications to the user (e.g., `default`, `granted`, or `denied`).

Added: Nov 30, 2025

847. Explain the `window.postMessage()` method.

Show Answer

A method that enables secure cross-origin communication between `Window` objects (e.g., between an iframe and its parent, or two different windows).

Added: Nov 30, 2025

848. What is the role of `Trusted Types` (browser security feature)?

Show Answer

A security mechanism that requires certain APIs (like `innerHTML`) to only accept pre-sanitized input, mitigating DOM-based XSS vulnerabilities.

Added: Nov 30, 2025

849. How does `WebAuthn` (Web Authentication API) work?

Show Answer

It enables users to authenticate to a web application using hardware authenticators (e.g., security keys, biometrics) instead of passwords, leveraging public-key cryptography.

Added: Nov 30, 2025

850. What is the difference between `localStorage` and `sessionStorage`?

Show Answer

`localStorage` persists data across browser sessions and tabs. `sessionStorage` clears data when the browser tab or window is closed.

Added: Nov 30, 2025

851. What is the size limit for `localStorage`?

Show Answer

Typically 5MB to 10MB per origin, depending on the browser.

Added: Nov 30, 2025

852. What is the purpose of the `window.location.assign()` method?

Show Answer

It loads a new document at the specified URL, similar to setting `window.location.href`, but explicitly indicates an intent to navigate.

Added: Nov 30, 2025

853. What is the `window.history.pushState()` method used for?

Show Answer

It adds a state to the browser's session history stack without loading a new document, allowing for client-side routing in SPAs.

Added: Nov 30, 2025

854. How do you check if a browser is running offline?

Show Answer

By inspecting the `navigator.onLine` property, which returns a boolean indicating the network status.

Added: Nov 30, 2025

855. What is the purpose of the `<datalist>` element?

Show Answer

It provides a set of pre-defined options for an `<input>` element, offering suggestions to the user as they type.

Added: Nov 30, 2025

856. What is the difference between `<time>` and `<input type="time">`?

Show Answer

`<time>` is a semantic element for marking up human-readable dates/times. `<input type="time">` is a form control for user input of time.

Added: Nov 30, 2025

857. How do you define a custom animation keyframe set in CSS?

Show Answer

Using the `@keyframes` rule, followed by the animation name and a set of keyframe rules (e.g., `from`/`to` or percentage selectors).

Added: Nov 30, 2025

858. What is the purpose of `animation-fill-mode`?

Show Answer

It specifies which values are applied to the element before the animation starts or after it finishes (e.g., `forwards` to keep the end state).

Added: Nov 30, 2025

859. What is the CSS `clip-path` property?

Show Answer

A property that allows you to specify a clipping region, determining which parts of an element should be visible, creating custom shapes.

Added: Nov 30, 2025

860. What is the `text-wrap: balance` property (future CSS)?

Show Answer

A future CSS property designed to optimize the line breaks in short blocks of text (like headings) to create a more aesthetically balanced appearance.

Added: Nov 30, 2025

861. What is the `hyphens` CSS property?

Show Answer

A property that controls how words should be hyphenated when text wraps across multiple lines, improving text layout and readability.

Added: Nov 30, 2025

862. What is the purpose of the `::first-line` pseudo-element?

Show Answer

It allows you to apply styles to the first formatted line of a paragraph of text.

Added: Nov 30, 2025

863. Explain the purpose of the `<picture>` element.

Show Answer

It allows developers to supply multiple `<source>` elements for different image files, letting the browser choose the most appropriate one based on screen size, resolution, or format support.

Added: Nov 30, 2025

864. What is the HTML attribute `srcset` for on an `<img>` tag?

Show Answer

It provides a comma-separated list of image sources and descriptors (width or pixel density) to allow the browser to select the best image for the current context.

Added: Nov 30, 2025

865. What is the `sizes` attribute used for with `srcset`?

Show Answer

It tells the browser the intended display size of the image (e.g., `(max-width: 600px) 100vw, 50vw`), enabling it to calculate the optimal image from the `srcset` before layout.

Added: Nov 30, 2025

866. What is the difference between `em` and `rem` units in CSS?

Show Answer

`em` is relative to the font-size of its *parent element*. `rem` (root em) is relative only to the font-size of the *root HTML element*.

Added: Nov 30, 2025

867. What are `Viewport Units` (vw, vh, vmin, vmax)?

Show Answer

CSS units that are relative to the size of the viewport: `vw` (viewport width), `vh` (viewport height), `vmin` (minimum of vw/vh), and `vmax` (maximum of vw/vh).

Added: Nov 30, 2025

868. Explain the concept of `CSS Logical Properties`.

Show Answer

CSS properties that define measurements based on flow direction (e.g., `margin-inline-start` instead of `margin-left` or `margin-right`), supporting internationalization and LTR/RTL layouts.

Added: Nov 30, 2025

869. What is the `HTTP/2 Server Push` feature?

Show Answer

A mechanism that allows the server to proactively send resources (like CSS, JS) to the client's cache before the client even requests them, based on anticipated needs.

Added: Nov 30, 2025

870. Why is `HTTP/2 Server Push` less common with HTTP/3?

Show Answer

HTTP/3 (QUIC) relies more on the `103 Early Hints` header and browser heuristics rather than direct server push due to the difficulty of predicting client needs perfectly.

Added: Nov 30, 2025

871. What is the `103 Early Hints` HTTP response status code?

Show Answer

An informational response code that allows the server to send hints (like `Link` headers for preloading) to the client before the final, full response is ready.

Added: Nov 30, 2025

872. Explain `Head-of-Line (HOL) Blocking` in HTTP/1.1.

Show Answer

A performance issue where resources are queued and must wait for the current request to complete, even if the later resources are ready to be sent, because HTTP/1.1 uses a single connection.

Added: Nov 30, 2025

873. How do HTTP/2 and HTTP/3 solve HOL blocking?

Show Answer

They both support **multiplexing**, allowing multiple requests and responses to be sent concurrently over a single connection, eliminating application-level HOL blocking. HTTP/3 further eliminates transport-level HOL blocking using QUIC streams.

Added: Nov 30, 2025

874. What is the JavaScript `Temporal` API proposal?

Show Answer

A new global object intended to replace the legacy `Date` object, providing a modern API for working with dates and times, including time zones, calendars, and instant points in time.

Added: Nov 30, 2025

875. What is the `Pipe Operator` proposal (`|>`)?

Show Answer

A proposal for a syntax that makes function chaining more readable, allowing the result of one expression to be passed as an argument to the next function call.

Added: Nov 30, 2025

876. Explain `WeakRef` (Weak Reference) in JavaScript.

Show Answer

An object that holds a weak reference to another object. If the only remaining reference to the object is a `WeakRef`, the garbage collector can still reclaim the object.

Added: Nov 30, 2025

877. What is the `FinalizationRegistry` object?

Show Answer

A JavaScript object that allows you to register a cleanup callback function to be executed when an object is about to be garbage collected.

Added: Nov 30, 2025

878. What is the concept of `Array Grouping` in JavaScript?

Show Answer

A proposed feature that allows developers to easily group elements in an array based on the return value of a callback function, typically resulting in an object or a map.

Added: Nov 30, 2025

879. What is the `CSS Custom Highlight API`?

Show Answer

An API that allows JavaScript to create custom highlight ranges (like selection or spelling errors) without modifying the DOM, allowing for custom styling via the `::highlight()` pseudo-element.

Added: Nov 30, 2025

880. Explain the purpose of `display: grid` vs. `display: inline-grid`.

Show Answer

`display: grid` creates a block-level grid container. `display: inline-grid` creates an inline-level grid container, allowing it to sit next to other inline elements.

Added: Nov 30, 2025

881. What is `grid-auto-flow: dense`?

Show Answer

A property value that allows the Grid layout algorithm to attempt to fill holes earlier in the grid caused by items of different sizes, potentially reordering items from the source DOM.

Added: Nov 30, 2025

882. What is the `aspect-ratio` CSS property?

Show Answer

A property that sets a preferred aspect ratio for an element, allowing the browser to automatically calculate the height or width based on the other dimension.

Added: Nov 30, 2025

883. What is the CSS `initial-letter` property?

Show Answer

A property used to set the size and sinking of the first letter of a text block, allowing for magazine-style drop caps.

Added: Nov 30, 2025

884. What is the `Web Performance Budget`?

Show Answer

A set of measurable constraints on the size, quantity, and load time of assets (like JavaScript, images) that the development team agrees not to exceed to maintain performance goals.

Added: Nov 30, 2025

885. What is `First Input Delay (FID)`?

Show Answer

A performance metric that measures the time from when a user first interacts with a page (e.g., clicks a button) to the moment the browser is able to begin processing event handlers.

Added: Nov 30, 2025

886. What is `Interaction to Next Paint (INP)`?

Show Answer

A new Core Web Vital metric that assesses responsiveness by tracking the latency of all user interactions throughout the page lifecycle, replacing FID by measuring the full delay.

Added: Nov 30, 2025

887. What is the `Paint Holding` browser feature?

Show Answer

A browser optimization where the browser can pause rendering updates during long-running tasks, preventing visual updates that happen in the middle of a task (jank).

Added: Nov 30, 2025

888. Explain `Tachyons` or `Tailwind CSS` (Utility-First CSS).

Show Answer

A paradigm where styling is done using single-purpose utility classes (e.g., `pt-4` for padding top 4), allowing developers to build custom designs without writing new CSS.

Added: Nov 30, 2025

889. What is `Atomic CSS`?

Show Answer

A philosophy where CSS classes are created with a single, immutable declaration (e.g., `.m0 {margin: 0;}`), emphasizing highly granular reuse.

Added: Nov 30, 2025

890. What is `BEM (Block Element Modifier)`?

Show Answer

A popular CSS naming convention that helps developers build reusable components by structuring class names as `block__element--modifier`.

Added: Nov 30, 2025

891. What is `CSS-in-JS`?

Show Answer

A technique that uses JavaScript to generate CSS styles, allowing developers to scope styles locally to components and leverage JavaScript variables/logic within their styles.

Added: Nov 30, 2025

892. What is the `document.adoptedStyleSheets` property?

Show Answer

A mechanism in the Shadow DOM for allowing multiple Shadow Roots and the main document to share the same CSS Stylesheet object, improving performance and avoiding duplicates.

Added: Nov 30, 2025

893. Explain `Tree Shaking` and how it works with ES Modules.

Show Answer

Tree shaking is a form of dead code elimination. It relies on the static structure of ES Modules (using `import`/`export`) to determine which code is actually used and can be safely removed from the final bundle.

Added: Nov 30, 2025

894. What is `Code Splitting`?

Show Answer

The practice of dividing a single large JavaScript bundle into multiple smaller chunks that can be loaded on demand, reducing the initial load time of an application.

Added: Nov 30, 2025

895. What is the difference between `Dynamic Imports` and `Static Imports`?

Show Answer

Static imports (`import ... from '...'`) are parsed at build time and load all modules initially. Dynamic imports (`import('...')`) return a Promise and load the module only when executed (at runtime), enabling code splitting.

Added: Nov 30, 2025

896. What is `Differential Serving`?

Show Answer

The practice of serving modern, smaller JavaScript bundles (using ES Modules and modern syntax) to modern browsers, while sending larger, transpiled (ES5) bundles only to older browsers that need them.

Added: Nov 30, 2025

897. What is `ESBuild` and its main advantage?

Show Answer

A JavaScript bundler and minifier written in Go, primarily known for its extremely fast build times compared to older tools like Webpack.

Added: Nov 30, 2025

898. What is `Vite`?

Show Answer

A modern frontend build tool that leverages native ES Modules in development for instant server start-up and fast Hot Module Replacement (HMR).

Added: Nov 30, 2025

899. What is `Babel`?

Show Answer

A free and open-source JavaScript compiler used to convert modern JavaScript code (ES6+) into backward-compatible versions (ES5) that can run in older browsers.

Added: Nov 30, 2025

900. What is the role of `PostCSS` in a build pipeline?

Show Answer

A tool that acts as a post-processor for CSS, allowing developers to use plugins (like Autoprefixer) to transform CSS with JavaScript.

Added: Nov 30, 2025