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 does Incremental Static Regeneration (ISR) allow a website to do?
Not quite. Try another option.
Answer: Update static pages after deployment
ISR allows selected static pages to be regenerated periodically without rebuilding the entire site.
Question 4 of 60 · Client-side Rendering · Easy
Where is most of the page content generated in Client-side Rendering?
Not quite. Try another option.
Answer: In the user's browser
Client-side rendering uses JavaScript in the browser to create or update the page content.
Question 5 of 60 · Rendering Strategy Selection · Easy
Which rendering strategy is generally suitable for content that changes rarely?
Not quite. Try another option.
Answer: Static Site Generation
SSG is a good choice for content that is stable because pages can be created during the build.
Question 6 of 60 · Rendering Strategy Selection · Easy
Which factor is important when selecting a rendering strategy?
Not quite. Try another option.
Answer: How often the data changes
Data freshness requirements help determine whether SSR, SSG, ISR, or client-side rendering is appropriate.
Question 7 of 60 · Server Components · Easy
Where do Server Components primarily render?
Not quite. Try another option.
Answer: On the server
Server Components run and render on the server, reducing the amount of JavaScript sent to the browser.
Question 8 of 60 · Client Components · Easy
Which feature commonly requires a Client Component?
Not quite. Try another option.
Answer: Handling a button click
Client Components can use browser interactions, event handlers, and other client-side features.
Question 9 of 60 · Server Components · Easy
What is one benefit of using Server Components?
Not quite. Try another option.
Answer: Less JavaScript sent to the browser
Server Components can keep rendering logic on the server, which can reduce the client-side JavaScript bundle.
Question 10 of 60 · Client Components · Easy
Client Components are mainly used for which purpose?
Not quite. Try another option.
Answer: Interactive user interface behavior
Client Components support interactive features such as state, event handlers, and browser APIs.
Question 11 of 60 · Fetch API · Easy
What is the Fetch API commonly used for?
Not quite. Try another option.
Answer: Making network requests
The Fetch API allows an application to request resources such as data from a server.
Question 12 of 60 · Fetch API · Easy
What does a successful HTTP response usually provide when using the Fetch API?
Not quite. Try another option.
Answer: A Response object
The Fetch API returns a Promise that resolves to a Response object representing the server's response.
Question 13 of 60 · Fetch API · Easy
Which method is commonly used to read JSON from a Fetch API response?
Not quite. Try another option.
Answer: response.json()
The json() method parses the response body as JSON and returns a Promise.
Question 14 of 60 · Client-side Fetching · Easy
When does client-side fetching usually occur?
Not quite. Try another option.
Answer: After JavaScript runs in the browser
Client-side fetching happens in the browser, often after the initial page has loaded.
Question 15 of 60 · Client-side Fetching · Easy
Which is a common advantage of client-side fetching?
Not quite. Try another option.
Answer: It can update data without a full page reload
Client-side fetching can retrieve new data and update part of a page without navigating away or reloading the whole document.
Question 16 of 60 · Server-side Data Fetching · Easy
Where does server-side data fetching take place?
Not quite. Try another option.
Answer: On the server before the response is sent
Server-side data fetching retrieves data on the server before generating or sending the page response.
Question 17 of 60 · Server-side Data Fetching · Easy
What is one benefit of fetching sensitive data on the server?
Not quite. Try another option.
Answer: Server credentials can remain private
Fetching sensitive data on the server helps prevent private credentials from being exposed to users.
Question 18 of 60 · Caching and Revalidation · Easy
What is caching?
Not quite. Try another option.
Answer: Storing data for possible reuse
Caching stores a previously obtained result so it can be reused, often improving performance.
Question 19 of 60 · Caching and Revalidation · Easy
What does revalidation usually mean?
Not quite. Try another option.
Answer: Checking whether cached data is still current
Revalidation checks or refreshes cached content so that users can receive updated data.
Question 20 of 60 · Caching and Revalidation · Easy
What is a possible result of using a long cache duration?
Not quite. Try another option.
Answer: Faster responses with older data
A long cache duration can improve response speed, but the cached data may be less recent.
Question 21 of 60 · Server-Side Rendering (SSR) · Medium
An e-commerce product page must display current inventory in its initial HTML and remain discoverable by search engines. Which rendering strategy best fits these requirements?
Not quite. Try another option.
Answer: Render the page on the server for each request
SSR produces request-time HTML containing the latest inventory, while also giving search engines immediately available page content.
Question 22 of 60 · Server-Side Rendering (SSR) · Medium
A server-rendered dashboard reads a user identifier from an authenticated request before loading account data. What is the main consequence for caching the complete HTML response?
Not quite. Try another option.
Answer: The response should be cached separately by user
Because the HTML contains user-specific data, a shared public cache could expose one user's content to another user.
Question 23 of 60 · Static Site Generation (SSG) · Medium
A documentation website changes only when a new software version is released. Which approach generally provides the lowest request-time server workload?
Not quite. Try another option.
Answer: Generate all documentation pages during the build
SSG creates the HTML ahead of time, allowing the pages to be served directly without request-time rendering.
Question 24 of 60 · Static Site Generation (SSG) · Medium
A statically generated catalog contains 100,000 product pages, and every build is becoming too slow. Which change most directly reduces build-time generation work?
Not quite. Try another option.
Answer: Prebuild popular products and generate others on demand
Generating only high-traffic pages at build time avoids processing the entire catalog while still permitting less common pages to be created later.
Question 25 of 60 · Incremental Static Regeneration (ISR) · Medium
A news article page uses ISR with a revalidation interval of 300 seconds. An editor publishes a correction 100 seconds after the latest generation. What should readers generally expect?
Not quite. Try another option.
Answer: The old page may remain until revalidation occurs
ISR can serve the existing static page until it becomes eligible for revalidation and a refreshed version is generated.
Question 26 of 60 · Incremental Static Regeneration (ISR) · Medium
A product page uses time-based ISR, but an urgent price update must appear as soon as the pricing system changes. Which addition best addresses this requirement?
Not quite. Try another option.
Answer: Trigger on-demand revalidation after the price update
On-demand revalidation lets the pricing system invalidate or regenerate the affected page immediately instead of waiting for a timer.
Question 27 of 60 · Client-side Rendering · Medium
A browser-rendered analytics page shows an empty container until a large JavaScript bundle executes and its API request completes. Which user-facing metric is most directly at risk?
Not quite. Try another option.
Answer: Time until meaningful content becomes visible
With client-side rendering, meaningful content may be delayed by JavaScript download, execution, and data fetching.
Question 28 of 60 · Client-side Rendering · Medium
A team is building an authenticated drawing tool with frequent pointer events, local state changes, and little need for search indexing. Why is client-side rendering suitable for its main workspace?
Not quite. Try another option.
Answer: It supports rich interactions without full-page navigation
Client-side rendering is well suited to highly interactive interfaces that update local UI state frequently without reloading entire pages.
Question 29 of 60 · Rendering Strategy Selection · Medium
A site has public marketing pages, frequently updated product prices, and a private interactive account area. Which combination is the most appropriate starting point?
Not quite. Try another option.
Answer: SSG for marketing, SSR or ISR for products, and client rendering for accounts
Stable public content benefits from SSG, changing product data can use SSR or ISR, and interactive private workflows commonly rely on client rendering.
Question 30 of 60 · Rendering Strategy Selection · Medium
A public transit page must show live arrival times, but its route descriptions change only monthly. Which design best balances freshness and performance?
Not quite. Try another option.
Answer: Statically render descriptions and fetch arrivals dynamically
The stable route content can be generated ahead of time, while live arrival data should be fetched at request time or in the browser.
Question 31 of 60 · Server Components · Medium
A component reads records directly from a database and renders a non-interactive table. What is a key benefit of implementing it as a Server Component?
Not quite. Try another option.
Answer: Database access code stays out of the browser bundle
Server Components can access server-only resources and send rendered output without shipping database code or credentials to the browser.
Question 32 of 60 · Server Components · Medium
A Server Component needs to include an interactive favorite button. Which component structure is most appropriate?
Not quite. Try another option.
Answer: Keep data rendering on the server and nest a Client Component button
The server can render data-heavy content while a small Client Component provides the event handler and interactive state.
Question 33 of 60 · Client Components · Medium
A search filter uses useState, responds to input events, and reads localStorage. Why must it run as a Client Component?
Not quite. Try another option.
Answer: It depends on browser APIs and interactive state
State hooks, event handlers, and browser-only APIs require execution in the client environment.
Question 34 of 60 · Client Components · Medium
A page currently marks its top-level layout as a Client Component only because one nested menu needs toggle state. What change is most likely to reduce client-side JavaScript?
Not quite. Try another option.
Answer: Move the client boundary down to the menu
Keeping the interactive boundary close to the menu allows the surrounding layout to remain server-rendered and avoids shipping unnecessary component code.
Question 35 of 60 · Fetch API · Medium
The code fetch('/api/orders').then(response => response.json()) attempts to parse an HTTP 404 response as normal data. Which check should be added before parsing?
Not quite. Try another option.
Answer: Check response.ok and handle a false value
fetch usually resolves for HTTP error statuses, so response.ok should be checked before treating the body as successful data.
Question 36 of 60 · Fetch API · Medium
A user changes a search term quickly, and an older request sometimes finishes after a newer request and overwrites the results. Which Fetch API feature best prevents this?
Not quite. Try another option.
Answer: Cancel the previous request with AbortController
AbortController can cancel an obsolete request so its result does not replace data from the user's newer search.
Question 37 of 60 · Client-side Fetching · Medium
A client-rendered component starts a data request inside an effect whenever productId changes. What should it do when the component unmounts or productId changes again?
Not quite. Try another option.
Answer: Abort or ignore the obsolete request
Cleaning up or ignoring stale requests prevents outdated responses from updating state after the component or selected product has changed.
Question 38 of 60 · Server-side Data Fetching · Medium
A page must call an internal service using a private API key and include the result in the initial HTML. Where should the request be made?
Not quite. Try another option.
Answer: On the server using a protected environment variable
Server-side fetching can use private credentials without exposing them in browser code while still including the fetched data in the initial response.
Question 39 of 60 · Caching and Revalidation · Medium
A shared cache stores responses for /api/profile, but the endpoint returns data based on the current user's session cookie. Which cache policy is safest?
Not quite. Try another option.
Answer: Use a private cache or disable shared caching
User-specific responses must not be reused across sessions; a private cache or no shared caching prevents data leakage.
Question 40 of 60 · Caching and Revalidation · Medium
An API response includes Cache-Control: max-age=60, stale-while-revalidate=300. What behavior does this permit after the first 60 seconds?
Not quite. Try another option.
Answer: Serve stale content temporarily while refreshing it
After the fresh period ends, stale-while-revalidate permits a stale response to be served while an updated response is fetched in the background.
Question 41 of 60 · Server-Side Rendering (SSR) · Hard
A news page is rendered on every request. Its HTML contains current headlines, but the browser later reports a hydration mismatch because the server and client rendered different timestamps. Which change most directly preserves SSR while preventing the mismatch?
Not quite. Try another option.
Answer: Pass the server timestamp to the client and reuse it during hydration
Hydration requires the client's initial render to match the server HTML. Reusing the serialized server timestamp provides deterministic initial output while retaining SSR.
Question 42 of 60 · Server-Side Rendering (SSR) · Hard
An SSR product page performs three independent upstream requests taking ms, ms, and ms. Ignoring framework overhead, what is the best achievable data-fetching latency if all requests begin concurrently?
Not quite. Try another option.
Answer: ms
Concurrent independent requests complete when the slowest request finishes, so latency is ms.
Question 43 of 60 · Static Site Generation (SSG) · Hard
A documentation site has 500,000 versioned pages, but only 2% receive regular traffic. A full build has become prohibitively slow. Which design best preserves static delivery without generating every page during each deployment?
Not quite. Try another option.
Answer: Prebuild popular pages and generate uncommon pages on first request
Prebuilding high-traffic routes and generating long-tail routes on demand retains static delivery while avoiding build work proportional to the entire page set.
Question 44 of 60 · Static Site Generation (SSG) · Hard
A statically generated pricing page reads prices from a database only during the production build. The database changes two hours later, and no regeneration mechanism is configured. What will users receive from the existing deployment?
Not quite. Try another option.
Answer: The old prices until another build is deployed
Pure SSG fixes the generated output at build time. Browser or CDN validation cannot create updated HTML unless a new build or regeneration process runs.
Question 45 of 60 · Incremental Static Regeneration (ISR) · Hard
An ISR page has a revalidation interval of 60 seconds. A cached version is 75 seconds old when a request arrives, and the platform uses stale-while-revalidate behavior. What response pattern should be expected?
Not quite. Try another option.
Answer: The request receives stale content while regeneration starts in the background
With stale-while-revalidate ISR, the first request after expiry can receive the stale page while regeneration updates the cache for later requests.
Question 46 of 60 · Incremental Static Regeneration (ISR) · Hard
A regenerated ISR page depends on a database that is temporarily unavailable. The previous generated page is valid but stale. Which failure policy usually provides the strongest availability without publishing an incomplete page?
Not quite. Try another option.
Answer: Keep serving the previous page and retry regeneration later
A failed regeneration should not replace a valid cached artifact. Serving the previous version preserves availability while a later attempt can refresh it.
Question 47 of 60 · Client-side Rendering · Hard
A client-rendered dashboard fetches /api/account after mounting. When a user signs out and another signs in within the same browser tab, the old request completes last and overwrites the new account state. Which solution addresses the underlying race?
Not quite. Try another option.
Answer: Cancel obsolete requests or ignore responses whose request identity is stale
Request cancellation or identity checks prevent an older asynchronous result from committing after a newer request has become authoritative.
Question 48 of 60 · Client-side Rendering · Hard
A CSR application receives a minimal HTML shell and loads a large JavaScript bundle before requesting page data. On slow mobile devices, which change most directly improves first meaningful content without abandoning CSR for later interactions?
Not quite. Try another option.
Answer: Embed route-critical data and prerender the initial content
Prerendering initial content and embedding its data removes the initial JavaScript-and-fetch dependency chain while allowing subsequent navigation to remain client-rendered.
Question 49 of 60 · Rendering Strategy Selection · Hard
A commerce application has public product descriptions updated hourly, user-specific inventory by region, and a cart that changes immediately in the browser. Which rendering composition best matches those requirements?
Not quite. Try another option.
Answer: Regenerate product content, fetch regional inventory per request, and manage the cart client-side
The public catalog benefits from regeneration, request-specific inventory requires dynamic server data, and the cart needs immediate client interaction.
Question 50 of 60 · Rendering Strategy Selection · Hard
A page must be indexed with complete content, uses request-time authorization, and displays confidential records that must never be stored in a shared cache. Which primary rendering strategy is most appropriate?
Not quite. Try another option.
Answer: Uncached SSR after server-side authorization
Request-time server rendering can authorize access and return complete HTML, while disabling shared caching prevents confidential output from leaking across users.
Question 51 of 60 · Server Components · Hard
A Server Component imports a database client, reads records, and passes selected fields to a nested Client Component. Which boundary rule is essential?
Not quite. Try another option.
Answer: Props crossing the boundary must be serializable values
Data sent from a Server Component to a Client Component crosses a serialization boundary. Database connections, arbitrary class instances, and server-only objects cannot be passed directly.
Question 52 of 60 · Server Components · Hard
A component only formats fetched records into a table and has no state, effects, browser APIs, or event handlers. It currently ships a large formatting dependency to the browser. What is the strongest reason to make it a Server Component?
Not quite. Try another option.
Answer: Its formatting dependency can remain outside the client bundle
Server Components can execute rendering dependencies on the server and send rendered results, reducing JavaScript shipped to the browser.
Question 53 of 60 · Client Components · Hard
An interactive search Client Component receives an initial result list from a Server Component, then filters that list as the user types. Which implementation respects the component boundary while avoiding an unnecessary initial duplicate request?
Not quite. Try another option.
Answer: Pass serializable initial results as props and store only interactive state on the client
Serializable server-fetched props can seed the Client Component. The browser then owns only interaction state, avoiding a redundant mount-time fetch.
Question 54 of 60 · Client Components · Hard
A developer marks the application root as a Client Component merely because one deeply nested button uses onClick. What is the most significant architectural consequence?
Not quite. Try another option.
Answer: A much larger subtree becomes part of the client JavaScript boundary
Placing the client boundary too high can pull a broad module subtree into the client bundle. The boundary should generally be close to components requiring interactivity.
Question 55 of 60 · Fetch API · Hard
A request made with fetch() receives HTTP status 404 and a valid JSON error body. No network failure occurs. Which statement describes the promise behavior?
Not quite. Try another option.
Answer: The promise resolves, so code must inspect response.ok or response.status
fetch() normally rejects for network-level failures, not ordinary HTTP error statuses. Applications must explicitly check the response status.
Question 56 of 60 · Fetch API · Hard
The same Response object's body is parsed with await response.json() and then read with await response.text(). What should the code expect under standard Fetch API body semantics?
Not quite. Try another option.
Answer: The second read fails because the body stream has already been consumed
A response body is generally a one-use stream. Use response.clone() before consumption when two independent reads are genuinely required.
Question 57 of 60 · Client-side Fetching · Hard
A search field requests results for each query. Responses may arrive out of order, and cached results should be reused when the user returns to an earlier query. Which cache key design is necessary for correctness?
Not quite. Try another option.
Answer: A stable key containing every input that changes the result
The key must identify the resource's full data dependency, such as query and relevant user scope. Otherwise distinct results may collide or cached data cannot be reused.
Question 58 of 60 · Server-side Data Fetching · Hard
A server-rendered page fetches an internal API that merely forwards the request to a database available to the same server process. Under what condition is querying the database directly usually preferable?
Not quite. Try another option.
Answer: When the API adds no required policy boundary and the direct module is server-only
Direct server-side access avoids an unnecessary HTTP hop when the API provides no essential authorization, isolation, or service boundary. The database module must remain server-only.
Question 59 of 60 · Caching and Revalidation · Hard
A shared cache stores /profile responses, but the server chooses the profile from an authentication cookie. Which caching change is required to prevent one user's profile from being served to another?
Not quite. Try another option.
Answer: Use a private cache or bypass shared caching for the personalized response
Cookie-dependent personalized content must not use an unpartitioned shared cache. A private cache or no shared caching prevents cross-user disclosure.
Question 60 of 60 · Caching and Revalidation · Hard
A product mutation succeeds, and the application invalidates only the cache entry for /products/42. The product also appears in /products, /featured, and a category page. Which strategy most reliably prevents stale derived views?
Not quite. Try another option.
Answer: Tag related cache entries by product and invalidate that tag
Tag-based invalidation can connect the detail page and every derived listing to the same product dependency, allowing one mutation to revalidate all affected entries.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of INT257 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 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.