Meta Refresh for Safari

喜夏-厌秋 提交于 2020-01-05 07:11:23

问题


I used meta refresh but it doesn't work 'Safari'. What can i do?

<meta http-equiv="refresh" content="5;URL='http://example.com/'">

回答1:


It is not supported by Safari.. And your not the only one who asked that.. There is 2 possibility:

  1. Make a button to let user refresh the page
  2. Use Ajax to be able to update parts of your website

Hope this helps!




回答2:


According to what I found on Google; this may have been a bug in Safari in the past but many people claim it's been resolved.

There's also someone mentioning that it could be that this specific header is disabled in Safari.

If none of the above works, you can always use javascript to do the redirection:

function redirect()
{
    setTimeout(function(){window.location='otherpage.html'},5000);//5 secs
}

window.onload=redirect;


来源:https://stackoverflow.com/questions/12181399/meta-refresh-for-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!