Only use js if browser refresh stopped working

This commit is contained in:
Daniel Winzen
2016-05-10 08:16:25 +02:00
parent 07ff78994e
commit 147c511c61

View File

@ -284,7 +284,8 @@ function print_start($class='', $ref=0, $url=''){
echo "<!DOCTYPE html><html><head>$H[meta_html]";
if(!empty($url)){
echo "<meta http-equiv=\"Refresh\" content=\"$ref; URL=$url\">";
$ref*=1000;
$ref+=5;//only use js if browser refresh stopped working
$ref*=1000;//js uses milliseconds
echo "<script type=\"text/javascript\">setTimeout(function(){window.location.replace(\"$url\");}, $ref);</script>";
}
if($class==='init'){