Print to the console and display on the browser at the same time.