How to Redirect Page in PHP after a few seconds without meta http-equiv=REFRESH CONTENT=time

zhenming picture zhenming · Jun 22, 2012 · Viewed 89.6k times · Source

It seems that it is not advisable to use

<meta http-equiv=REFRESH CONTENT=3;url=url>

for redirects but instead use

header('Location: url')

However, I would like to show the user some message and allow them some time to read it before redirecting. Is there a way to do it without meta?

Answer

Dador picture Dador · Jun 22, 2012

Try use "refresh" header:

header('Refresh: 3;url=page.php');

Also, you can look at this Question Refresh HTTP Header.