before page was loaded