DEV Community

Gabriel Lima Ferreira
Gabriel Lima Ferreira

Posted on

Breaking the 400ms LCP Barrier: Next.js 15 & RFC 8058 Case Study.

HERO RETWe recently launched the new RET Tecnología platform, and the goal was simple: prove that high-end motion design shouldn't compromise security or performance. Here’s the exhaustive breakdown of how we achieved a 100/100 Lighthouse score while maintaining a luxury visual experience.

  1. The Next.js 15 Async Paradigm: Migrating to Next.js 15 meant embracing the asynchronous nature of
    headers()
    and cookies(). We moved our entire session audit logic to the edge middleware. This allowed us to serve static content instantly while the dynamic security layers are resolving in parallel.

  2. Solving the Hydration Bottleneck: Animation libraries like Framer Motion are great, but they are heavy on hydration. We implemented a Gating Strategy:

// Example of our Mounted Gating hook
function useEliteHydration() {
  const [mounted, setMounted] = useState(false);
  useEffect(() => setMounted(true), []);
  return mounted;
}
Enter fullscreen mode Exit fullscreen mode

By ensuring that complex motion paths only hydrate after the initial paint, we slashed our TTI (Time to Interactive) by 35%.

  1. RFC 8058: The Unsubscribe Standard: Most agencies ignore email headers. We didn't. By implementing RFC 8058 directly into our Resend notification layer, we established immediate trust with Gmail and Outlook filters. Our list-unsubscribe requests are handled at the protocol level, which means our sender reputation is practically bulletproof.

The Takeaway: Precision engineering isn't just for back-ends. The front-end is where your business converts. Treat it with the same respect.

🔗 View the results: rettecnologia.org

Top comments (0)