MacOS – Set Safari 7 dv tools console to clear on reload

macossafariweb-inspector

I use Safari 7.03 for web development.

One thing I noticed is that the console log doesn't re-set on a reload of the page. You need to clear it manually.

So if you run a page with a JS error, it shows, then you fix the error in your JS code and reload the page and the error is still in the log — but it's from the LAST time.

Chrome clears the error log every time. Is this a setting in Safari somewhere?

Best Answer

Either inline in your HTML, or in an external Javascript file. Call the function console.clear();

Now, every time you go to reload your page, the console will be cleared.