Error library / this error
How to fix it
Refused to load the script 'https://…' because it violates the following Content Security Policy directive
What it means
The page has a Content Security Policy that does not allow that resource, so the browser refused to load or run it.
Common causes
- A new third-party script, font or image host is not in the policy.
- Inline scripts or eval are blocked by script-src.
- A browser extension injected something the page policy forbids.
How to fix it
1. Add the host to the right directive
Match the directive named in the message, such as script-src, img-src or connect-src.
Content-Security-Policy: script-src 'self' https://cdn.example.com
2. Avoid inline scripts
Move code to a file, or allow specific inline blocks with a nonce.
3. Test in report-only mode first
Use Content-Security-Policy-Report-Only to see violations without breaking the page.
Catch it the moment it happens
ErrorBell shows a dot on the page when this error occurs and takes you to the failing line, so you do not have to hunt through the console. Add it to Chrome, it is free.