Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari 5.1 unloading tabs from memory

Well, it seems Safari 5.1 at least on Lion which is what I'm using now decides to unload tabs from memory as it deems it necessary.

The big issue with this is sites that display ajax alerts or ones that have chats as for example GMail. I was having 2 conversations on Google Talk right in the GMail website and while I was on another tab I noticed the title blinking indicating new messages in my conversations, as soon as I clicked the tab Safari decided to completely reload the page, losing all those conversations (I don't keep logs of those).

It goes without saying that this behavior breaks modern web apps and seems unnecessary on a desktop computer. I understand the necessity of this on iOS devices due to ram constrains though.

Is there any way to disable this "feature", I couldn't find a way to do so. It's that or switching to Chrome or Firefox, but I like Safari.

Thanks.

like image 742
Ernesto Gonzalez Avatar asked Nov 14 '22 19:11

Ernesto Gonzalez


1 Answers

I think I have a temporary work around. Pages on my site — petersonguides.com — periodically reload the tab in Safari 5.1. Ordinarily this wouldn't be a big issue, but I have a video that plays in a FancyZoom box and it can't get all the way through without the tab being refreshed.

I tested with Chrome and it doesn't cause the same tab reload behavior, so I'm sure it's a Safari 5.1 problem.

I have JavaScript and PHP on the home page and I thought there might be a conflict, so I started pulling things off and retesting with the video. The last thing I checked was removing the Google Analytics script. That fixed the problem.

I tried bumping up the Database Storage amount - per the previous answer - but that didn't have any effect.

like image 99
Nigel Hall Avatar answered Nov 17 '22 04:11

Nigel Hall