avoid 'PageVisibilityEvent.js will not work in this environment.' message