admin管理员组

文章数量:1328001

Is there any setting in Coda, or hackable solution, to get the JavaScript Console log to automatically clear itself after page reload?

I often stumble when I see old errors in the log, that doesn't still exist.

Is there any setting in Coda, or hackable solution, to get the JavaScript Console log to automatically clear itself after page reload?

I often stumble when I see old errors in the log, that doesn't still exist.

Share Improve this question edited Jul 9, 2020 at 10:50 braX 11.8k5 gold badges22 silver badges37 bronze badges asked Apr 30, 2009 at 9:00 HenrikHenrik 2,5914 gold badges26 silver badges34 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

Use:

console.clear();

If you want to erase all the previous logs and to show the fresh ones - put it on top of your JavaScript file.

If you use jQuery try

$(function(){ console.clear(); });

Or try

window.onload = function(){ setTimeout("console.clear()",3000) }

本文标签: loggingCoda Automatically Clear JavaScript Console on page reloadStack Overflow