use visibility.js to refresh page