It’s not a good practice to delete the header section.
If you are using the mater page and content page then add this code in the master page.
Master Page
<head runat="server">
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
and write your code here in the content page
Content Page
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script type="text/javascript">
function preventBack() { window.history.forward(); }
setTimeout("preventBack()", 10);
window.onunload = function () { null }; </script>
</asp:Content>