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

109
Visualizações
In the Browser dev tools in console the output is different after refresh

I'm currently learning javascript. Therefore I'm often in the Brwoser's dev tool, in the console tab. Now there is something that I can't explain. The output in the console log is different after refreshing the webpage. Either it is like the upper window in my screenshot or like the lower window. In Chrome it is always like in the upper window. In Brave browser the chance is about 50/50 that it is like the upper or lower.

I have found out that the option "preserve log" change the output so that it is always like the upper screenshot. But I would like to turn off this option to get a cleared console after a refresh.

Does anyone know how to change this behavior of the browser?

I'm working on macOS 12.0.1 Monterey and Brave Broser: Version 1.32.106 Chromium: 96.0.4664.45 (Offizieller Build) (x86_64)
or
Chrome: Version 96.0.4664.55 (Offizieller Build) (x86_64)

enter image description here

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

0

I would like to share the solution to my problem. Now I'm a few lessons further in my course and got new commands. With the load EventListener it works:

let jumbo

window.addEventListener("load", e => {
    jumbo = document.querySelector(".jumbotron");
    console.log(jumbo);
});

The teacher mentioned also that there are also two other parameter or commands: "async" and "defer".

about 4 years ago · Juan Pablo Isaza Relatório

0

Click the gear in the top right corner of the console panel to show options. Untick "Preserve log". enter image description here

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