Problem
Several pages load third-party JavaScript that may delay parsing, add privacy/security exposure, or be unnecessary:
- Chart.js is loaded synchronously inside the person template.
- AddThis is loaded on every page.
- Bootstrap, analytics, Amazon Store, newsletter, and other widgets add further third-party dependencies.
Backend rendering is now much lighter, so browser-side dependencies are a likely next source of perceived latency.
Proposed investigation
- Measure representative pages with browser performance tooling.
- Confirm which integrations are still used and remove obsolete ones.
- Ensure page-specific libraries are only loaded where needed.
- Defer, asynchronously initialise, or self-host retained scripts where appropriate.
- Review Subresource Integrity and Content Security Policy implications.
Acceptance criteria
- There is a documented keep/remove decision for each third-party script.
- Chart.js no longer blocks HTML parsing on person pages.
- Obsolete global scripts are removed.
- Retained scripts fail without breaking core page content.
- Before/after performance measurements are recorded.
Problem
Several pages load third-party JavaScript that may delay parsing, add privacy/security exposure, or be unnecessary:
Backend rendering is now much lighter, so browser-side dependencies are a likely next source of perceived latency.
Proposed investigation
Acceptance criteria