JavaScript Redirects
Detects JavaScript resources that return 3XX redirects
Detects JavaScript resources that return 3XX redirects
| Rule ID | perf/js-redirects |
| Category | Performance |
| Scope | Site-wide |
| Severity | warning |
| Weight | 4/10 |
Solution
JavaScript files that redirect add unnecessary latency and increase page load time. Update script src attributes to point directly to the final URL. Common causes: CDN URL changes, versioned script paths, or domain migrations. Check if third-party scripts have updated their recommended URLs.
Enable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["perf/js-redirects"]Disable all Performance rules
squirrel.toml
toml[rules]
disable = ["perf/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["perf/js-redirects"]
disable = ["*"]