Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when auditing slow page loads, heavy assets, or rendering delays related to Avoid JavaScript-based redirects. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-16 | ✓→✗ | ▼ Worse | -15% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -5% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 9% | 0% |
JavaScript redirects force an additional round-trip after the initial page load, significantly increasing the time users spend waiting for content.
window.locationCheck the project for instances where JavaScript is being used for page-level redirects (e.g., window.location).
Replace JavaScript-based redirects with server-side 301 or 302 redirects in your web server or edge configuration.
Explain why server-side redirects are faster and more SEO-friendly than client-side JavaScript redirects.
Review the routes, assets, and loading behavior that affect Avoid JavaScript-based redirects. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.
For full implementation details, code examples, and framework-specific guidance, see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/performance/js-redirects
Other measured skills in the registry, with their headline benchmark lift.