Reputation: 8425
Is there a way to clear the console in Firefox?
In Chrome I can use...
console.clear()
(Not sure if it works for Safari or Opera though)
However I haven't been able to find a solution for Firefox. Is this type of API not yet available? Is there a workaround that doesn't require?
console.log("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
Upvotes: 21
Views: 19378
Reputation: 330
In more recent versions of Firefox, you can use console.clear()
or built-in helper function clear()
to clear console screen
and clearHistory()
to entirely clear console's command history.
Check out more useful helper functions here
Upvotes: 0
Reputation: 1952
Perhaps you also want to clear via GUI of the browser.
Here is the screenshot:
Upvotes: 1
Reputation: 1165
Keep it simple. Better press Ctrl +Shift + L to clear the output in Firefox 44+. Whereas in previous versions press Ctrl + L.
In Mac, for Chrome (105.0.5195.102
) and firefox(v103.0.2
) Ctrl + L still works.
Upvotes: 18
Reputation: 9021
You can also use the following shortcut depending on your OS
Windows & Linux: Ctrl + Shift + L
Mac: Ctrl + L or Cmd + K for Firefox 67 or newer.
Upvotes: 1
Reputation: 3164
For anyone who comes to this question, console.clear()
works in Firefox since version 48.0.
https://developer.mozilla.org/es/docs/Web/API/Console/clear
Upvotes: 5
Reputation: 2347
I've been looking for future implementations of firefox, but still they don't want to implement it. So basically you can't in webconsole, but you can in firebug.
See: https://developer.mozilla.org/en-US/docs/Web/API/console
Upvotes: 0
Reputation: 1885
In firefox you can just input clear()
. It well be done.
Here's a link to the Developer's website for Javascript console commands: http://msdn.microsoft.com/en-us/library/windows/apps/hh696634.aspx
Upvotes: 21