Avoid JavaScript-based redirects
SkillMediajs-redirects is an agent skill for auditing page-load performance issues caused by JavaScript-based redirects. It guides the agent to check a project for page-level redirects done with JavaScript, verify the actual bottleneck using DevTools, Lighthouse, or field data, and recommend server-side 301 or 302 redirects instead. It also explains why server-side redirects are faster and more SEO-friendly.
Available today. Use it from your connected AI after setup.
No other account needed.
Have an agent environment that supports loading skills.
Then ask your AI: use the Avoid JavaScript-based redirects skill
What your AI can do with it
- Check a project for page-level redirects implemented with JavaScript, such as window.locat
- Verify the real bottleneck in DevTools, Lighthouse, or field data before recommending chan
- Recommend replacing JavaScript redirects with server-side 301 or 302 redirects
- Explain why server-side redirects are faster and more SEO-friendly than client-side ones
- Review routes, assets, and loading behavior, flagging files or requests that add unnecessa
- Reference detailed rule guidance and code examples in references/rule.md
Getting started
- Have an agent environment that supports loading skills.
- Add the js-redirects skill to the agent's available skills.
- Have access to the project whose page loads and redirect behavior need auditing.
- Ask the agent to audit slow page loads or rendering delays related to JavaScript-based redirects.
- Use DevTools, Lighthouse, or field data to confirm findings before applying recommended changes.
What this skill tells your AI
The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/js-redirects/SKILL.md and read by ahel’s review.
JavaScript redirects force an additional round-trip after the initial page load, significantly increasing the time users spend waiting for content.
Quick Reference
- Use 301 or 302 server-side redirects instead of
window.location - JS redirects delay page load as the browser must first download and execute the script
- Client-side redirects can negatively impact SEO and indexability
Check
Check the project for instances where JavaScript is being used for page-level redirects (e.g., window.location).
Fix
Replace JavaScript-based redirects with server-side 301 or 302 redirects in your web server or edge configuration.
Explain
Explain why server-side redirects are faster and more SEO-friendly than client-side JavaScript redirects.
Code Review
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
Signals
- GitHub stars
- 74k
- Forks
- 7k
- Last commit
- Aug 2026
Questions
- When should this skill be used?
- Use it when auditing slow page loads, heavy assets, or rendering delays related to JavaScript-based redirects. It verifies the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
- What fix does it recommend?
- Replace JavaScript-based redirects with server-side 301 or 302 redirects configured in the web server or edge configuration.
Advanced
- Item type
- skill
- Key
js-redirects- Source
- github.com/thedaviddias/front-end-checklist