In short
Ahrefs flags "Page has broken JavaScript" for pages that load at least one script file returning a 4xx or 5xx error. Fix the broken files themselves (see "JavaScript broken") and every page using them is fixed. Prioritize pages where the broken script powers something important, such as a form, navigation, or content that only appears after JavaScript runs.
This is the page-level view of "JavaScript broken."
How to prioritize
Site-wide scripts first. A broken file in the header or footer affects every page.
Conversion pages next. Check that contact forms, booking widgets and checkout still work.
Content-rendering scripts. If a script builds visible content, a failure can mean an empty page for crawlers.
Check the page yourself
Open a flagged page, press F12, and look at the Console and Network tabs. Failed scripts show in red with their status code. Then test the page's key features by hand.
Fix
See "JavaScript broken" for causes and platform steps. In most cases, clearing caches or removing leftover script tags from uninstalled plugins and apps clears the issue.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Chrome for Developers, Inspect network activity
Google Search Central, Fix Search-related JavaScript problems

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



