set page ctx after page load condition