OS X Yosemite suspends inactive windows I have some user script that runs every about 10 minutes on specific page at opened tab in Safari 8.

The surprise is that safari somehow suspend javascript execution when tab is not active by user for a while.

The question is how to force javascript execution and prevent this behavior?

UPD: actually the same behavior is detected in Opera. I think the problem is  related to Yosemite release?
It might be going into "App Nap"

To disable this for Safari go to Finder, hit ⌘+I and check "Prevent App Nap": 


You can check to see if it worked by going opening up Activity Monitor, clicking the Energy tab and seeing if Safari is in sleep mode.