Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome new tab holds memory

I'm developing a Chat on nodejs. Like any chat , users sends links all the time. The situation is whenever a user click on any link (anchor tag with '_blank' target) , Chrome open a new tab (Example: a youtube video) that seems to link both , main and new tab , in memory looking like this :

http://s22.postimg.org/a9u5sm9dt/Chat_Tabs.png

It seems like a normal behavior but when the user close that new tab , main tab holds memory from newer tab , reducing just a few Ks.

http://s22.postimg.org/e7m0vrlkx/Chat_Tabs_User_Close.png

Garbage Collector doesn't run always and supposing that an user open 30 links , memory can grow significantly.

Anyone know how to create an anchor tag that can avoid this behavior? It's a Chrome problem ? My version is 33.0

An interesting behavior is when the user does a right-click and open a new tab from the menu. Chrome creates a new tab separately. That's the behavior I want to replicate.

Cheers!

like image 958
Machinerium Avatar asked Apr 03 '14 20:04

Machinerium


1 Answers

I found a solution to this, setting rel=noreferrer to the anchor tag. Now it opens any number of tabs separately without overloading memory on main tab.

like image 94
Machinerium Avatar answered Oct 24 '22 04:10

Machinerium