Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

124
Visualizações
Async or defer (or delay) CSS load

I'm working on my site speed score and trying to improve my Pagespeed (Remove unused CSS report).

First I have followed this page: load CSS simpler and I have deferred the following way but page speed keeps alerting me that the /css/second-style CSS file is not deferred:

<link rel="stylesheet" href="/css/second-style.css" media="print" onload="this.media='all'">

So, I have tried another way, using: loadCSS, I have done it this way:

<script src="loadCSS.js"></script>
<script>
  loadCSS( "/css/second-style.css" );
</script>

I think the two ways of doing it are quite clear and simple, and they are supposed to work but page speed does not approve /css/second-style.css.

Any idea if in 2021 it has to be done differently or what is my mistake? Is there another way to delay the CSS load?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Even though u load the CSS last or in the beginning the total load time will be the same.. Try minifying CSS and make it single file(There by reduce the number of request)

To increase speed more you can also try Compressing JavaScript and HTML and also Image sprit

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda