A
A
Amongu2021-12-12 03:14:44
JavaScript
Amongu, 2021-12-12 03:14:44

Can errors in the Chrome console clog RAM or permanent memory, if so, how to prevent this?

There is an html page that throws an error every second
61b53e787122c376580802.png
. This page will be open around the clock, possibly for several weeks in a row. The question is, will this somehow affect the operation of the machine on which this tab is open?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
rPman, 2021-12-12
@Amongu

the error message itself takes little time and it really takes a lot to make it noticeable,
but here is the debugging information, when a large object is displayed in console.log and a lot - it takes decent RAM (since the entire object is copied and stored in memory so that you could see it in the interface) I had an example when the firefox window worked for more than a day and the debugging information loaded the RAM so heavily that the swap file was involved and the browser itself was wildly slow, but clearing the console immediately fixed everything,
call the consloe.clear () script like so for automatic cleaning of the console once an hour, this will be more than enough setInterval(()=>console.clear(),3600*1000)

G
GrayHorse, 2021-12-12
@GrayHorse

You don't have to do anything, the closed console only stores the last 1000 entries.

S
Sergey Karbivnichy, 2021-12-12
@hottabxp

if yes, how to prevent it?
Might just fix the error. You can also place pictures at the desired address, or remove file access from the script.
In general, it is not clear what this page will do, and even without the code it is difficult to answer the question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question