Add home and back button to the search result page in SharePoint 2010

Once people get into the search result page, there is no way to go back to the previous page without clicking the browser back button.

We can add some code to a content editor web part to display a button on the page to let people go back to previous page and with search term displaying in the search box.

Here is the code to add to a content editor web part:

<!–Home button–>

<a href=”/”>
 <img src=”_layouts/images/hhome.png” border=”0″ alt=””/>
<a href=”/”>Home</a>

<!–Back button–>
<a onclick=”history.go(-1)” href=”#”>
 <img src=”_layouts/images/back.gif” border=”0″ alt=””/>
<a onclick=”history.go(-1)” href=”#”>Back</a>