Skip to main content
Detects JavaScript resources that return 3XX redirects
Rule IDperf/js-redirects
CategoryPerformance
ScopeSite-wide
Severitywarning
Weight4/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.

Options

This rule has no configuration options.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["perf/js-redirects"]

Disable all Performance rules

squirrel.toml
[rules]
disable = ["perf/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["perf/js-redirects"]
disable = ["*"]