简体   繁体   中英

How can I find what part of my website is causing a browser memory leak?

I am developing a website and have noticed that when I work on the main page my browser (Firefox and Chrome) start consuming a lot of memory.

A recent example was using Firefox with 8 tabs open. 2 of which were my website. Firefox was using 800,000K (and climbing) of memory according to Windows Task Manager.

I closed down the 2 tabs pertaining to my website and Firefox memory consumption dropped to around 424,000K.

My site relies heavily on javascript (jQuery especially) and so I would suspect that my issue is coming from that direction.

Does anyone know a way of isolating what the problem is?

Thanks

jQuery和javascript应该是轻量级的,但是如果您确定是这种情况,则可以重构JavaScript并在需要时加载脚本,也可以使用插件等...否则,您可以转到IIS并更改连接限制,您可能会看到在Firebug中加载需要花费多长时间

I suggest taking a deep look to these articles about profiling JavaScript with Chrome Developer tools:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM