making sure search is flushed the moment someone clicks on a new page