Inline JavaScript
Checks for inline <script> blocks — affects CSP and caching.
What this check measures
We count inline `<script>` elements without src. Similar to inline CSS — excessive inline JS prevents caching and blocks strict CSP.
Why it matters
Inline scripts re-parse on every page load (vs. cached external). Strict CSP requires either unsafe-inline (defeats CSP) or per-script nonces (maintenance burden).
How our audit detects it
Count <script> tags without src attribute. Flag pages with more than ~3.
Typical findings
- error_outlineAnalytics inline on every page.
- error_outlineHydration script inline with large JSON state.
How to fix
Move to external JS files. For hydration state, use JSON attributes or fetch-after-hydrate. For third-party snippets, use the `async` attribute.
Frequently asked questions
Is any inline JS bad?expand_more
Want this checked on your site?
Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.
Scan my siteRelated checks
SSR / Pre-rendering
Checks if the page is server-rendered or statically pre-rendered.
TechnicalHTTP Status Codes
Checks that pages return proper status codes — 200 for live, 404 for missing, 301 for moved.
TechnicalNo Client-Side Redirects
Checks that redirects happen server-side, not via JavaScript.
TechnicalViewport Meta Tag
Checks for <meta name="viewport" content="width=device-width, initial-scale=1">.