Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

124
Vistas
What event is late enough to not impact PageSpeed?

(Note, this isn't about making a random tool giving me a better number; I'm diagnosing a landing page that is having terrible performance, and based on the web vitals assessment, real users are taking nearly 10 seconds to get to interactive!)

I don't think I'm using very much JavaScript, but apparently what I am using is quite slow (Google Tag Manager and Stripe each add between 500-700 ms!!).

I've managed to get https://pagespeed.web.dev/ into the upper 80s / lower 90s for mobile, but I've done so by delaying all JavaScript. Now I only load 1 script, and that script loads the other scripts after either 5000ms or first user interaction (I check for mouseover, keydown, touchmove, or touchstart).

So far so good. However, there are some scripts I'd like to load earlier (really, as soon as possible). I've tried

window.onload = loadEarlyScripts();

document.body.addEventListener('load', loadEarlyScripts);

and

document.body.addEventListener('readystatechange', () => {
  if ( document.readystate === 'complete' ) loadEarlyScripts;
});

But all of those drop my PageSpeed performance from 85-95 to ~ 45. So, the user-interaction events are good enough, but none of these are. What's the earliest event I can target that will make PageSpeed happy?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda