To prevent your browser console from clearing when the page refreshes.
Click on the settings icon located in the console window.
Click on “Preserve log” to toggle it on.
Once it’s turned on, you can click the settings icon again to hide the menu.
Execute the ‘console.log(“Hello”)‘ command in the console, then refresh the page. You’ll notice that the console does not clear.