You had put an include on the top of the page:
<?php include("jsscripts.php"); ?>
That writes client side javascript to the page before the <!DOCTYPE HTML> tag and before the redirect.
You can't redirect to a new page once the page you are on has started writing code to the page. The solution was to move your include down to the <head> tag inside the <body> which is the top-most location you could put it. (usually you put scripts right before the </body> to help the page load more quickly, but it probably isn't too significant)