如果< meta>已弃用自动刷新,我应该使用什么? [英] if <meta> is deprecated for auto refreshing, what should i use?

查看:88
本文介绍了如果< meta>已弃用自动刷新,我应该使用什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用< meta http-equiv =refreshcontent =5> 来自动更新我的网页,然后我发现在5秒钟之前点击刷新导致自动更新不起作用,至少在IE8中。

I've been using <meta http-equiv="refresh" content="5"> for a little while to auto update my pages, and then I found that clicking refresh before the 5 seconds is up causes the auto update not to work, at least in IE8.

所以我决定研究标签被找到并且找到:通过META元素自动刷新超过10年[5],并且在此之前被认为是有问题的。

So I decided to research the <meta> tag and found, according to wikipedia: " Auto refreshing via a META element has been deprecated for more than ten years [5] and recognized as problematic before that ".

那么,我应该用什么来自动更新我的网页? (我猜这将是一个javy scripty kinda thingy。)

So, what SHOULD I be using to auto update my pages? (I am guessing it will be a javy scripty kinda thingy.)

感谢您提前预订!!!!

Thanks bunches in advance!!!!

推荐答案

是的,您可以使用javascript轻松完成。

Yeah, you can do it easily with javascript.

类似:

function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}

我不知道你真的想做什么,但是提醒整个页面可能会过度。

I don't know what you really want to do, but refreshing the entire page might be overkill.

考虑使用JQuery / AJAX刷新页面的一部分。

Consider using JQuery/AJAX to refresh only a part of your page.

这篇关于如果&lt; meta&gt;已弃用自动刷新,我应该使用什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆