0

Recently I've been working a lot with an interface built in jQuery that's running on a web-socket. It will perform a lot of changes in the interface while running (color & background animation, slide effects & adding/removing elements for example).

I have noticed that if not having the interface on the front of your screen that all the changes are stacked in the interface and will be executing after you bring the tab to the front. I guess that it is something in design or the browsers for efficiency.

Is there anything I can do to counter this? If you haven't look at the interface there so many calls executing when opening the tab that the browser lock up for a while.

Any advice here would be appreciated!

lex82
  • 11,173
  • 2
  • 44
  • 69
user3263038
  • 1
  • 2
  • 3
  • Possibly look into http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active/1060034#1060034 and http://www.w3.org/TR/page-visibility/ – CollinD Sep 05 '15 at 19:29
  • This is exactly what i need. Didn't know on what keyword to look for. Thank you every much! – user3263038 Sep 05 '15 at 19:48
  • Javasscript timers are slowed or suspended when the page is not visible to save CPU and battery. – jfriend00 Sep 05 '15 at 20:05

0 Answers0