Meta tag refresh


(Loren Mark) #1

Hello,

I would like to know please, why the meta tag refresh is used in Neos redirections e.g.

$escapedUri = htmlentities($loginUri, ENT_QUOTES, 'utf-8');
$response->setContent('<html><head><meta http-equiv="refresh" content="' . intval(0) . ';url=' .$escapedUri . '"/></head></html>');
$response->setStatus(302);
$response->setHeader('Location', $loginUri);
$response->setHeader('X-Redirect-Reason', 'NotAuthenticated');

The example above is here [SOLVED] Frontend login: Redirect to login form Also I have seen a lot of examples without the meta refresh tag (just the ```setHeader Location), is there any reference in the docs for it and the usage purpose?

Thanks in advance.


(Christian Müller) #2

Basically just a fallback for clients that don’t understand location headers, but it’s ancient and could probably be removed these days.