js刷新的最小刷新时间是多少?对于每40毫秒的超小刷新,我会面临什么潜在的问题...我有一个很好的理由这样做,这并不疯狂。
function refresh(){
var refreshTime = 40;
setTimeout("location.reload(true);",refreshTime);
}
我有一个应用程序,显示活动的相对时间使用矩js插件。时间会自动刷新,将其与当前时间进行比较并显示(如facebook新闻提要)。应用程序以前是用angularjs编写的,我用以下代码构建了这个功能:
JS:
filter('convertSeconds', function() {
return function(seconds) {
if( typeof(seconds) == 'undefined' ) return;
// units is a string with possible val
我使用显示一些绑定变量。我页面的骨架是
<body>
<!-- the content of the page, including an instance of the variable {{hello}} -->
<script src="vue.js"></script>
<script src="myscript.js"></script>
</body>
打开页面时,页面显示{{hello}}的时间很短,在此之后,将立即替换为变量hello的正确值。
什么是正确的方法(