Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!