What are the potential pitfalls of using meta refresh or redirect as alternatives to header redirection in PHP?

Using meta refresh or redirect as alternatives to header redirection in PHP can lead to slower page load times, as the browser needs to wait for the HTML content to load before being redirected. This can also impact SEO, as search engines may not follow meta refresh or redirect tags. To solve this issue, it is recommended to use header redirection in PHP for faster and more reliable redirection.

<?php
header("Location: https://www.example.com");
exit();
?>