Avoid JavaScript-based redirects

SkillMedia

js-redirects is a skill that guides an AI agent through diagnosing whether JavaScript-based redirects are slowing down web pages. It helps audit slow page loads, heavy assets, or rendering delays related to Avoid JavaScript-based redirects, and stresses verifying the actual bottleneck before recommending changes.

Use Avoid JavaScript-based redirects in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Avoid JavaScript-based redirects and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Avoid JavaScript-based redirects skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have an AI agent that can load and use skills.

Avoid JavaScript-based redirectsStart free

What your AI can do with it

  • Diagnose whether JavaScript-based redirects are slowing down web pages
  • Audit slow page loads, heavy assets, and rendering delays
  • Verify the actual bottleneck in DevTools, Lighthouse, or field data
  • Ground recommendations in evidence before suggesting changes

Getting started

  1. Have an AI agent that can load and use skills.
  2. Add the js-redirects skill to the agent's available skills.
  3. Ask the agent to audit a page for slow loads or rendering delays, and it will follow the skill's diagnostic guidance.
  4. Provide access to DevTools, Lighthouse, or field data so the agent can verify the actual bottleneck.

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
Oct 2026

Questions

When should this skill be used?
Use it when auditing slow page loads, heavy assets, or rendering delays related to Avoid JavaScript-based redirects.
Does it fix the problem automatically?
No. It guides diagnosis and emphasizes verifying the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
What tools does it rely on for verification?
DevTools, Lighthouse, or field data can be used to confirm the real bottleneck before any changes are recommended.
Advanced
Item type
skill
Key
js-redirects
Source
github.com/thedaviddias/front-end-checklist