How does HTTP caching and Cache-Control affect a SPA?
Simple meaning
Hashed asset filenames can be cached immutable for a year while index.html stays no-cache so users get new hashes.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready Frontend Master questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
Hashed asset filenames can be cached immutable for a year while index.html stays no-cache so users get new hashes.
Open the full page for Why, Steps, Example and Key takeaway.
INP looks at interaction latency throughout the page life, not only the first input.
Open the full page for Why, Steps, Example and Key takeaway.
I run the HTML through a sanitizer with an allowlist of tags and no script, iframe, or event handlers.
Open the full page for Why, Steps, Example and Key takeaway.
A malicious site can POST to my API and the browser attaches SameSite-None cookies.
Open the full page for Why, Steps, Example and Key takeaway.
CSP tells the browser which script, style, and connect origins are allowed.
Open the full page for Why, Steps, Example and Key takeaway.
I mock the network, render, assert a loading state, then waitFor the items by role.
Open the full page for Why, Steps, Example and Key takeaway.
MSW intercepts at the network layer so the app code stays realistic.
Open the full page for Why, Steps, Example and Key takeaway.
I use a dialog with aria-modal, label it, and move focus to the first control on open.
Open the full page for Why, Steps, Example and Key takeaway.
Text needs enough contrast against its background so low-vision users can read it, with stricter ratios for small text.
Open the full page for Why, Steps, Example and Key takeaway.
When fetch uses credentials include, the server cannot reply Access-Control-Allow-Origin star.
Open the full page for Why, Steps, Example and Key takeaway.
They can serve shell HTML and assets offline, which is great for PWAs.
Open the full page for Why, Steps, Example and Key takeaway.
Synchronous logs run first.
Open the full page for Why, Steps, Example and Key takeaway.
Class Foo still has Foo.prototype and instances link to it.
Open the full page for Why, Steps, Example and Key takeaway.
Position sticky on th only works if ancestors do not have overflow hidden.
Open the full page for Why, Steps, Example and Key takeaway.
A stacking context is a local z-index world.
Open the full page for Why, Steps, Example and Key takeaway.
I wrap the await in try catch and set error state or show a toast.
Open the full page for Why, Steps, Example and Key takeaway.
The server can flush HTML in chunks as Suspense boundaries resolve instead of waiting for the whole tree.
Open the full page for Why, Steps, Example and Key takeaway.
In the effect I create a controller, pass signal to fetch, and abort in cleanup.
Open the full page for Why, Steps, Example and Key takeaway.
Each route becomes its own JS payload plus shared vendors.
Open the full page for Why, Steps, Example and Key takeaway.
I wrap with a real store preloaded with fixture state, or I render through the same provider the app uses.
Open the full page for Why, Steps, Example and Key takeaway.