Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
What is the main purpose of image optimization in a web application?
Not quite. Try another option.
Answer: To reduce loading time
Image optimization reduces file sizes and helps pages load faster.
Question 2 of 60 · Image Optimization · Easy
Which image format commonly provides efficient compression for modern websites?
Not quite. Try another option.
Answer: WebP
WebP typically produces smaller files than older formats while maintaining good visual quality.
Question 3 of 60 · Metadata API · Easy
What type of information is commonly defined using a Metadata API?
Not quite. Try another option.
Answer: Page title and description
A Metadata API commonly defines information such as page titles and descriptions for browsers and search engines.
Question 4 of 60 · Metadata API · Easy
Which metadata value is normally displayed on a browser tab?
Not quite. Try another option.
Answer: Page title
The page title is commonly shown on the browser tab and in search results.
Question 5 of 60 · Code Splitting · Easy
What does code splitting do in a web application?
Not quite. Try another option.
Answer: Divides code into smaller bundles
Code splitting divides application code into smaller bundles that can be loaded when needed.
Question 6 of 60 · Code Splitting · Easy
What is a common benefit of code splitting?
Not quite. Try another option.
Answer: A smaller initial download
Code splitting can reduce the amount of JavaScript downloaded during the initial page load.
Question 7 of 60 · Lazy Loading · Easy
What does lazy loading mean?
Not quite. Try another option.
Answer: Loading content when it is needed
Lazy loading delays a resource until the user or application needs it.
Question 8 of 60 · Lazy Loading · Easy
Which resource is commonly lazy-loaded when it is below the visible part of a page?
Not quite. Try another option.
Answer: An image
Images below the visible area are often lazy-loaded until the user scrolls near them.
Question 9 of 60 · SEO Fundamentals · Easy
What does SEO stand for?
Not quite. Try another option.
Answer: Search Engine Optimization
SEO stands for Search Engine Optimization, which helps search engines understand and rank web content.
Question 10 of 60 · SEO Fundamentals · Easy
Which HTML element is most appropriate for the main heading of a page?
Not quite. Try another option.
Answer: <h1>
The <h1> element identifies the main heading and supports a clear page structure.
Question 11 of 60 · Production Build · Easy
What is a production build?
Not quite. Try another option.
Answer: An optimized version for deployment
A production build prepares and optimizes an application for use in a live environment.
Question 12 of 60 · Production Build · Easy
Which process commonly reduces the size of production JavaScript files?
Not quite. Try another option.
Answer: Minification
Minification removes unnecessary characters from code to reduce file size.
Question 13 of 60 · Environment Configuration · Easy
What is an environment variable commonly used for?
Not quite. Try another option.
Answer: Storing configuration values
Environment variables store settings that may differ between development, testing, and production.
Question 14 of 60 · Environment Configuration · Easy
Which value commonly changes between development and production environments?
Not quite. Try another option.
Answer: API base URL
Applications often use different API base URLs in development and production.
Question 15 of 60 · Deployment Platforms · Easy
What is the main role of a deployment platform?
Not quite. Try another option.
Answer: Hosting and serving an application
A deployment platform makes a built application available to users over a network.
Question 16 of 60 · Deployment Platforms · Easy
Which service is commonly used to deploy modern web applications?
Not quite. Try another option.
Answer: Vercel
Vercel is a deployment platform commonly used to host modern web applications.
Question 17 of 60 · Performance Monitoring · Easy
What is the purpose of performance monitoring?
Not quite. Try another option.
Answer: To measure application speed
Performance monitoring tracks metrics related to loading speed and responsiveness.
Question 18 of 60 · Performance Monitoring · Easy
Which metric measures how long a page takes to become usable?
Not quite. Try another option.
Answer: Time to Interactive
Time to Interactive estimates when a page has loaded enough to respond reliably to user input.
Question 19 of 60 · Error Logging · Easy
What is the main purpose of error logging?
Not quite. Try another option.
Answer: To record application failures
Error logging records failures and useful context so developers can diagnose problems.
Question 20 of 60 · Error Logging · Easy
Which information is useful in an error log?
Not quite. Try another option.
Answer: Error message and timestamp
An error message and timestamp help developers identify what failed and when it happened.
Question 21 of 60 · Image Optimization · Medium
A product page displays the same image at widths ranging from 320 px on phones to 1200 px on desktops. Which approach best reduces unnecessary image transfer?
Not quite. Try another option.
Answer: Use responsive srcset and sizes attributes
srcset and sizes allow the browser to select an image appropriate for the rendered size and device resolution, reducing unnecessary bytes.
Question 22 of 60 · Image Optimization · Medium
A website's Largest Contentful Paint element is a hero image visible immediately after navigation. Which optimization is most appropriate?
Not quite. Try another option.
Answer: Preload the hero image and size it explicitly
Preloading helps the browser discover the critical hero image early, while explicit dimensions reduce layout shifts.
Question 23 of 60 · Metadata API · Medium
A Next.js product route must generate a unique title and description from the product identifier. Which implementation is most suitable?
Not quite. Try another option.
Answer: Call generateMetadata in the dynamic route
generateMetadata can use route parameters or fetched data to produce server-rendered metadata for each product page.
Question 24 of 60 · Metadata API · Medium
A page appears correctly in search results, but social platforms show no preview image when its URL is shared. Which metadata should be added?
Not quite. Try another option.
Answer: Open Graph image metadata
Social platforms commonly use Open Graph fields such as og:image, og:title, and og:description to build link previews.
Question 25 of 60 · Code Splitting · Medium
An analytics dashboard includes a large chart editor used only after the user selects Edit chart. What is the best code-splitting strategy?
Not quite. Try another option.
Answer: Dynamically import the editor on demand
A dynamic import keeps the large editor out of the initial bundle and downloads it only when the feature is needed.
Question 26 of 60 · Code Splitting · Medium
After route-based code splitting, users notice a short delay when opening a frequently visited settings page. Which technique can reduce the delay without restoring one large bundle?
Not quite. Try another option.
Answer: Prefetch the settings route when appropriate
Prefetching downloads the route's code during idle time or based on likely navigation, preserving code splitting while improving responsiveness.
Question 27 of 60 · Lazy Loading · Medium
A long article contains twenty photographs, but only the first two are visible when the page loads. Which loading policy is most appropriate?
Not quite. Try another option.
Answer: Load visible images eagerly and others lazily
Above-the-fold images should be available promptly, while off-screen images can use lazy loading to reduce initial network and decoding work.
Question 28 of 60 · Lazy Loading · Medium
A lazily loaded comments component causes the page footer to jump downward when the component appears. Which change best addresses the problem?
Not quite. Try another option.
Answer: Reserve space with a stable placeholder
A placeholder with suitable dimensions reserves layout space and reduces Cumulative Layout Shift when the lazy component renders.
Question 29 of 60 · SEO Fundamentals · Medium
An online store exposes the same product through URLs containing different tracking parameters. Which SEO measure best consolidates ranking signals?
Not quite. Try another option.
Answer: Add a canonical URL to the product page
A canonical URL identifies the preferred version of duplicate or near-duplicate pages so search engines can consolidate signals.
Question 30 of 60 · SEO Fundamentals · Medium
A recipe page is indexed, but the team wants search engines to better understand ingredients, cooking time, and ratings. What should be added?
Not quite. Try another option.
Answer: Recipe structured data using JSON-LD
Recipe schema in JSON-LD provides machine-readable meaning and can make the page eligible for relevant rich search results.
Question 31 of 60 · Production Build · Medium
A React application performs well during local production testing but is slow when tested through the development server. Why should performance be measured using a production build?
Not quite. Try another option.
Answer: Production builds minify and optimize assets
Development mode includes debugging checks and unoptimized output, while a production build more closely represents deployed performance.
Question 32 of 60 · Production Build · Medium
A production bundle unexpectedly contains a large debugging library that is imported but never used. Which build feature should normally remove it when the package supports static analysis?
Not quite. Try another option.
Answer: Tree shaking
Tree shaking removes statically detectable unused exports, reducing the amount of JavaScript included in the production bundle.
Question 33 of 60 · Environment Configuration · Medium
A frontend needs an API base URL that differs between staging and production. How should the URL normally be configured?
Not quite. Try another option.
Answer: Use environment-specific configuration variables
Environment variables allow the deployment process to provide the correct non-secret configuration without changing application source code.
Question 34 of 60 · Environment Configuration · Medium
A developer stores a database password in a variable prefixed for exposure to browser code. What is the primary problem?
Not quite. Try another option.
Answer: The password can be included in client bundles
Variables exposed to browser code are visible to users. Database credentials and other secrets must remain in server-only configuration.
Question 35 of 60 · Deployment Platforms · Medium
A single-page application deployed to static hosting returns a 404 when users refresh /account/settings, although client-side navigation works. What configuration is needed?
Not quite. Try another option.
Answer: Rewrite unknown routes to the application entry file
The host should serve the SPA entry file for client-managed routes so the client-side router can interpret the requested path.
Question 36 of 60 · Deployment Platforms · Medium
A team wants every pull request to receive an isolated URL for testing before production deployment. Which platform capability best supports this workflow?
Not quite. Try another option.
Answer: Preview deployments
Preview deployments build each proposed change in an isolated environment and provide a shareable URL for review and testing.
Question 37 of 60 · Performance Monitoring · Medium
Laboratory tests report fast page loads, but users in one geographic region report poor performance. Which monitoring approach would best verify their experience?
Not quite. Try another option.
Answer: Collect real-user performance metrics by region
Real User Monitoring captures actual device, network, and regional conditions that controlled laboratory tests may not reproduce.
Question 38 of 60 · Performance Monitoring · Medium
A page becomes visually complete quickly, but clicking its main button often feels delayed. Which Core Web Vital is most relevant to investigate?
Not quite. Try another option.
Answer: Interaction to Next Paint
Interaction to Next Paint measures responsiveness by tracking the delay between user interactions and the next visual update.
Question 39 of 60 · Error Logging · Medium
A minified production stack trace points to app.8fd3.js, making the original source location difficult to identify. What should the error-monitoring service use?
Not quite. Try another option.
Answer: Uploaded production source maps
Source maps translate minified stack locations back to the original source files and line numbers for debugging.
Question 40 of 60 · Error Logging · Medium
An error report says Request failed but gives no clue which release, route, or user action produced it. Which improvement would make the report most actionable?
Not quite. Try another option.
Answer: Attach structured context and a correlation identifier
Structured context such as release, route, operation, and correlation ID helps developers connect related events and reproduce the failure.
Question 41 of 60 · Image Optimization · Hard
A product page displays a 2400×1600 hero photograph in a 600px-wide container. The image is above the fold, uses object-fit: cover, and the server supports responsive image transformation. Which implementation most effectively reduces the image's Largest Contentful Paint contribution without reducing visible quality?
Not quite. Try another option.
Answer: Serve a 600px WebP image with srcset and a matching sizes value
The browser can select an appropriately sized, compressed image before downloading it. Because the hero is above the fold, lazy loading is inappropriate, while an oversized or duplicated resource increases transfer and decode cost.
Question 42 of 60 · Image Optimization · Hard
A responsive site uses an art-directed mobile crop and a different desktop crop of the same editorial image. Which markup best communicates that the source must change with the viewport rather than merely scale?
Not quite. Try another option.
Answer: Use <picture> with media-specific <source> elements and a fallback <img>
<picture> supports art direction by selecting different source files based on media conditions. srcset on a single image is intended primarily for resolution or density selection, not different compositions.
Question 43 of 60 · Metadata API · Hard
A route renders product metadata from asynchronous database data. The application generates a canonical URL, Open Graph image, and title. Which design best prevents stale metadata when the product slug changes while preserving a stable canonical URL?
Not quite. Try another option.
Answer: Generate metadata from the resolved route parameters and product record
Route-specific metadata should be derived from the current parameters and fetched resource. Server-resolved metadata is available to crawlers and can produce a canonical URL that corresponds to the actual product.
Question 44 of 60 · Metadata API · Hard
A site has a localized article at /en/guide and /fr/guide. Search engines are receiving duplicate-content warnings because each page declares only its own canonical URL. Which metadata strategy is most appropriate?
Not quite. Try another option.
Answer: Use self-canonicals plus reciprocal hreflang references for both locales
Distinct language versions should generally identify themselves as canonical and link to equivalent alternatives with reciprocal hreflang annotations. A single-language canonical incorrectly signals that the other version is a duplicate.
Question 45 of 60 · Code Splitting · Hard
A dashboard's initial JavaScript bundle contains a 900KB charting library used only after a user opens an analytics tab. Which change most directly improves the initial route's parse and execution cost?
Not quite. Try another option.
Answer: Dynamically import the chart module when the analytics tab is activated
A dynamic import creates a separate chunk that is fetched and evaluated only when the feature is needed. Minification reduces bytes but does not remove the library's initial parse and execution cost.
Question 46 of 60 · Code Splitting · Hard
A bundler produces a shared vendor chunk containing nearly every dependency. The application has several rarely visited routes, but each route still downloads this large chunk on first navigation. Which change best targets route-level performance?
Not quite. Try another option.
Answer: Split dependencies according to route usage and load shared code selectively
A monolithic vendor chunk defeats route-level code splitting. Dependency grouping should reflect actual usage so rarely needed libraries are fetched only by routes that require them.
Question 47 of 60 · Lazy Loading · Hard
A page contains a below-the-fold video player and an above-the-fold hero image. Which loading policy is most appropriate?
Not quite. Try another option.
Answer: Lazy-load the video and eagerly load the hero image
Below-the-fold media can be deferred to reduce initial work, while the likely LCP hero should be available immediately. Layout dimensions should still be reserved independently with explicit sizing or aspect ratio.
Question 48 of 60 · Lazy Loading · Hard
An infinite-scroll feed uses IntersectionObserver, but it repeatedly requests the next page when the sentinel remains visible during a slow network response. What is the most robust fix?
Not quite. Try another option.
Answer: Guard requests with an in-flight flag and update pagination after success
An observer can fire repeatedly while the sentinel remains intersecting. Request serialization prevents duplicate pages, while pagination should advance only after the corresponding request succeeds.
Question 49 of 60 · SEO Fundamentals · Hard
A faceted commerce site exposes thousands of URLs through combinations of filters, many containing the same products and no unique search value. Which strategy best controls crawl waste while preserving useful category pages?
Not quite. Try another option.
Answer: Allow valuable facets, canonicalize duplicates, and block low-value combinations where appropriate
Faceted navigation requires deliberate URL governance. Valuable, unique pages can be indexable, while duplicate or low-value combinations should be consolidated or excluded from crawling and indexing.
Question 50 of 60 · SEO Fundamentals · Hard
A JavaScript-rendered article shows a loading shell in the initial HTML, and the article body appears only after client execution. Organic traffic is low despite correct titles and descriptions. Which change most directly improves crawl reliability?
Not quite. Try another option.
Answer: Render the article's primary content in server HTML or a pre-rendered response
Server-rendered or pre-rendered content makes the article available in the initial response and reduces dependence on crawler JavaScript execution. Metadata alone cannot replace missing primary content.
Question 51 of 60 · Production Build · Hard
A production build passes functional tests, but its JavaScript bundle contains source maps with embedded source content and internal API paths. What is the primary deployment concern?
Not quite. Try another option.
Answer: The maps may expose proprietary source and infrastructure details
Public source maps can reveal original code, comments, and internal paths. Teams commonly upload maps privately to an error-monitoring service while omitting or restricting public distribution.
Question 52 of 60 · Production Build · Hard
A release changes hashed asset filenames, but the deployment replaces the old assets immediately. Users with an older HTML document then receive 404 responses for its referenced chunks. Which deployment improvement addresses this failure mode?
Not quite. Try another option.
Answer: Retain old hashed assets for a compatibility window and publish HTML atomically
Previously served HTML can reference earlier immutable chunks. Keeping old assets temporarily and updating the document atomically prevents mixed-version deployments from producing chunk-not-found errors.
Question 53 of 60 · Environment Configuration · Hard
A frontend build exposes variables prefixed for client access. A developer places a database password in one of those variables, assuming the value is protected because the repository is private. What is the correct assessment?
Not quite. Try another option.
Answer: The password is exposed to clients and must be rotated and removed
Client-exposed environment variables are compiled into browser-delivered code or configuration. They are not secrets, regardless of repository visibility, naming, or source-map settings.
Question 54 of 60 · Environment Configuration · Hard
A single container image should be promoted from staging to production without rebuilding. The frontend currently embeds the API base URL during compilation. Which architecture best supports this requirement?
Not quite. Try another option.
Answer: Inject runtime configuration through a server-generated config endpoint
Runtime configuration separates the artifact from environment-specific values. The same image can then be promoted while the serving environment supplies the appropriate API endpoint.
Question 55 of 60 · Deployment Platforms · Hard
A globally distributed application has personalized pages that cannot be publicly cached, while its static assets are content-hashed and immutable. Which deployment design gives the best performance and correctness balance?
Not quite. Try another option.
Answer: Cache immutable assets at the edge and use short-lived or private caching for personalized HTML
Hashed assets are safe to cache for long periods because their URLs change when content changes. Personalized HTML needs user-aware cache controls to avoid data leakage and stale responses.
Question 56 of 60 · Deployment Platforms · Hard
A serverless deployment handles ordinary requests quickly but times out during a large report export. The export performs CPU-intensive work and exceeds the platform's execution limit. Which redesign is most appropriate?
Not quite. Try another option.
Answer: Queue the export as an asynchronous job and notify the user when it completes
Long-running work should be decoupled from request duration. A queue and worker can process the export within suitable limits while the user receives status and completion information.
Question 57 of 60 · Performance Monitoring · Hard
A field-monitoring dashboard reports excellent average LCP, but users on slow mobile networks still complain. Which measurement change is most likely to reveal the problem?
Not quite. Try another option.
Answer: Compare p75 or p95 LCP by device, connection, and geographic segment
Averages can hide poor experiences affecting a meaningful minority. Percentiles segmented by real-world conditions expose slow cohorts and help identify where remediation has the greatest impact.
Question 58 of 60 · Performance Monitoring · Hard
A release lowers the overall error rate but increases INP for users on low-end devices. Which investigation provides the strongest evidence for a release decision?
Not quite. Try another option.
Answer: Compare segmented INP distributions and correlate regressions with changed interactions
Performance regressions can affect specific devices or interactions while aggregate metrics improve. Segmented distributions and interaction-level correlation identify whether the release harms an important user cohort.
Question 59 of 60 · Error Logging · Hard
An error-monitoring service receives a stack trace from a minified production bundle, but the frames are unreadable. Source maps exist locally and contain sensitive source code. Which setup is most appropriate?
Not quite. Try another option.
Answer: Upload source maps privately with release identifiers and omit them from public assets
Private source-map uploads allow the monitoring service to symbolicate minified frames without exposing source code publicly. Matching release identifiers ensures the correct maps are used.
Question 60 of 60 · Error Logging · Hard
A client application logs full request payloads and authenticated URLs whenever an exception occurs. Logs are useful for debugging, but they may contain passwords and personal data. What is the best correction?
Not quite. Try another option.
Answer: Redact sensitive fields, minimize context, and restrict log access
Error context should support diagnosis without collecting unnecessary secrets or personal data. Redaction, data minimization, and access controls reduce exposure while preserving useful debugging information.
That's unit 5
Answer a few questions and your score shows up here.
Nearly through. Did unit 5 of INT257 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 5 of INT257 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.