web: Prevent display of empty page when switching pages