if the main content is not visible do not do db calls