Q11. How does code splitting produce chunks?
Code splitting divides the bundle so the browser downloads only what a route or interaction needs. Bundlers detect dynamic import() and create a separate chunk for that m...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (20 available).
Code splitting divides the bundle so the browser downloads only what a route or interaction needs. Bundlers detect dynamic import() and create a separate chunk for that m...
CAC is the cost of acquiring one customer. LTV is the profit that customer generates over their lifetime. Their ratio tells you whether growth is sustainable. I calculate...
Caching avoids re-downloading assets and is one of the cheapest performance wins. Use content-hashed filenames with a long Cache-Control: public, max-age=31536000, immuta...
A stampede happens when a popular key expires and many clients simultaneously hit the database to rebuild it. Several mitigations exist. - Locking or mutex: only the firs...
Next.js has several cache layers. The Data Cache stores individual fetch results and can be tagged. The Full Route Cache stores rendered HTML and RSC payloads for static ...
HTTP caching lets browsers and proxies reuse responses. `Cache-Control` sets the policy: - `max-age=300`: fresh for 300 seconds; no revalidation needed. - `s-maxage`: ove...
A content delivery network caches content on edge servers close to users, reducing latency and offloading the origin. How it works: DNS or anycast routes the user to a ne...
The `fetch` API in server components supports caching controls via `{ next: { revalidate } }` and cache modes like `cache: 'no-store'` or `cache: 'force-cache'`. Use `no-...
Next.js uses a built-in caching mechanism for static assets and API routes. You can also implement custom caching strategies using HTTP headers or libraries like `next-ca...
Cache revalidation can be handled using the `revalidate` option in `getStaticProps` or by setting appropriate HTTP headers in API routes. - **Using `revalidate`**: Automa...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.