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.
.claude/skills/thedaviddias-js-redirects/SKILL.md| 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
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 17,279 | 15,564 | -10% | 1 | 1 | 0% | 3,548 | 3,273 | -8% | 0 | 0 | — |
case-02 | pass→pass | 10,506 | 8,660 | -18% | 1 | 1 | 0% | 2,086 | 1,986 | -5% | 0 | 0 | — |
case-03 | pass→pass | 12,914 | 16,125 | +25% | 1 | 1 | 0% | 2,232 | 2,438 | +9% | 0 | 0 | — |
case-04 | pass→pass | 16,805 | 18,395 | +9% | 1 | 1 | 0% | 2,446 | 2,428 | -1% | 0 | 0 | — |
case-05 | pass→pass | 16,773 | 16,587 | -1% | 1 | 1 | 0% | 1,732 | 1,483 | -14% | 0 | 0 | — |
case-06 | pass→pass | 12,977 | 15,845 | +22% | 1 | 1 | 0% | 2,055 | 1,669 | -19% | 0 | 0 | — |
case-07 | pass→pass | 18,069 | 13,589 | -25% | 1 | 1 | 0% | 2,895 | 2,627 | -9% | 0 | 0 | — |
case-08 | pass→pass | 16,622 | 11,796 | -29% | 1 | 1 | 0% | 2,816 | 2,248 | -20% | 0 | 0 | — |
case-09 | pass→pass | 13,939 | 13,311 | -5% | 1 | 1 | 0% | 2,261 | 2,055 | -9% | 0 | 0 | — |
case-10 | pass→pass | 12,490 | 13,133 | +5% | 1 | 1 | 0% | 2,205 | 2,378 | +8% | 0 | 0 | — |
case-11 | pass→pass | 17,137 | 14,793 | -14% | 1 | 1 | 0% | 2,590 | 2,548 | -2% | 0 | 0 | — |
case-12 | pass→pass | 18,382 | 14,141 | -23% | 1 | 1 | 0% | 2,622 | 2,356 | -10% | 0 | 0 | — |
case-13 | pass→pass | 11,823 | 8,909 | -25% | 1 | 1 | 0% | 1,823 | 1,545 | -15% | 0 | 0 | — |
case-14 | pass→pass | 13,474 | 8,537 | -37% | 1 | 1 | 0% | 1,996 | 1,580 | -21% | 0 | 0 | — |
case-15 | fail→pass | 14,270 | 12,408 | -13% | 1 | 1 | 0% | 1,978 | 1,985 | +0% | 0 | 0 | — |
case-16 | pass→fail | 13,705 | 11,308 | -17% | 1 | 1 | 0% | 2,207 | 1,868 | -15% | 0 | 0 | — |
case-17 | pass→pass | 17,083 | 11,872 | -31% | 1 | 1 | 0% | 2,488 | 2,344 | -6% | 0 | 0 | — |
case-18 | pass→pass | 16,042 | 15,692 | -2% | 1 | 1 | 0% | 2,329 | 2,587 | +11% | 0 | 0 | — |
case-19 | fail→fail | 17,930 | 16,532 | -8% | 1 | 1 | 0% | 2,849 | 2,652 | -7% | 0 | 0 | — |
case-20 | pass→pass | 12,695 | 9,984 | -21% | 1 | 1 | 0% | 1,890 | 1,713 | -9% | 0 | 0 | — |
case-21 | pass→pass | 5,646 | 5,578 | -1% | 1 | 1 | 0% | 893 | 1,147 | +28% | 0 | 0 | — |
case-22 | pass→pass | 5,425 | 6,514 | +20% | 1 | 1 | 0% | 901 | 1,296 | +44% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.