Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 772 Bytes

persist-console-logs-between-page-refreshes.md

File metadata and controls

16 lines (11 loc) · 772 Bytes
title category date topics
Persist Console logs between page refreshes
Tip
2021-04-13 11:01:00 +7
DevTools

Imagine a situation where you print something in the Console when clicking or following a link. When you navigate to another page, the Console is cleared and all the messages are lost.

Fortunately, both Chrome DevTools and Firefox Developer Tools give us options to persist the logs between page loads.

Under the Console panel of Chrome DevTools, click the cog icon on the right, and turn on the Preserve log option:

Preserve log in Chrome DevTools

In addition to the logs of each page, DevTools also lets you know when you navigate to another page. It's easy for us to determine where a log message comes from.