use visibilitychange for determining when to fetch new data