Why Google Chrome increase the memory usage on each page reload?

后端 未结 4 1352
忘掉有多难
忘掉有多难 2021-01-01 06:33

When I open the Google Chrome task manager I can see the amount of memory use for each task/tab.

Each time I load a page in a tab I can see how the amount of memory

相关标签:
4条回答
  • 2021-01-01 07:00

    Although the Chrome team has fixed a few memory leaks, it seems like they still have not fixed all of them (see here). In my particular case, however, I was able to solve the problem with the following JavaScript snippet:

    window.addEventListener('unload', function () {
        document.documentElement.innerHTML = '';
    });
    

    Hope this helps someone. I have limited it to Chrome with browser sniffing:

    var isChrome = window.chrome && /Google/.test(navigator.vendor) && !/OPR|Edge/.test(navigator.userAgent);
    
    0 讨论(0)
  • 2021-01-01 07:03

    I had the same problem on Mac OS X 10.6.8 (Snow Leopard) with both Chrome and Firefox. I solved the problem by switching back to the 32-bit kernel.

    OS X: Starting up with the 32-bit or 64-bit kernel

    0 讨论(0)
  • 2021-01-01 07:12

    Definitely it's a Google Chrome issue, it has been fixed in the latest version (33.0.1750.152).

    Unfortunately Google has not confirmed me this issue, but it's working now.

    0 讨论(0)
  • 2021-01-01 07:17

    It's not normal and I've tested it myself in a couple of sites and it seems like a bug and we should report it.

    0 讨论(0)
提交回复
热议问题