This guide explains how to achieve 100/100 in Lighthouse for:
- Performance
- Accessibility
- Best Practices
- SEO
Move inline JS (background animation) into external file.
❌ Current:
<script>...</script>✅ Fix:
Create bg.js
```js
document.addEventListener("DOMContentLoaded", () => {
for (let i = 0; i < 25; i++) {
let circle = document.createElement("div");
circle.classList.add("circle");
circle.style.width = circle.style.height = Math.random() * 15 + 8 + "px";
circle.style.left = Math.random() * 100 + "vw";
circle.style.animationDuration = Math.random() * 7 + 6 + "s";
circle.style.opacity = Math.random();
document.querySelector(".background-animation").appendChild(circle);
}
});
Then add:
<script defer src="bg.js"></script>Remove unused classes from style.css
OR use:
- PurgeCSS
- Tailwind (if future upgrade)
Add:
<link rel="preload" href="https://fonts.gstatic.com/s/montserrat/v26/JTUQjIg1_i6t8kCHKm459WxRyS7m.woff2" as="font" type="font/woff2" crossorigin>AND update font:
font-display: swap;Just ensure:
- All images have
alt(✅ already done) - Buttons are clickable (✅)
- Contrast is readable (✅)
Optional improvement:
<html lang="en">Add integrity + crossorigin to FontAwesome:
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
integrity="sha512-papapapapapapapapapapapapapapapapapapapapapapapapapapapapapapapapapapapap"
crossorigin="anonymous"
referrerpolicy="no-referrer">Make sure:
- All links use
https:// - No mixed content
Check DevTools → Console Make sure 0 errors
<link rel="canonical" href="https://exploitinject.dev/"><script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "ExploitInject",
"url": "https://exploitinject.dev/"
}
</script>Add:
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="index, follow">(Already mostly done ✔)
Example:
<img src="..." alt="ExploitInject Logo - Cyber Security Company">- GZIP / Brotli
Cache-Control: public, max-age=31536000
- Cloudflare (recommended)