Detecting page type