What are the limitations of using the header function in PHP for frame navigation?

When using the header function in PHP for frame navigation, one limitation is that it cannot be used to target a specific frame or window. To work around this limitation, you can use JavaScript to achieve the desired frame navigation.

<?php
// Redirect to a new page with JavaScript to target a specific frame
echo '<script>window.top.location.href = "new_page.php";</script>';
?>