jQuery: setInterval effects on the server?
jQuery: setInterval effects on the server?
抱歉,如果这个问题不适合或太宽泛,但我找不到任何关于这个问题的信息,所以我需要在这里问。
这对某些人来说可能是一个愚蠢的问题,我想我知道答案,但只是为了确保,我想知道在我的 VPS 服务器上使用 setInterval
有什么影响。
即它是否占用了我的服务器中的大量资源?
它只是一个非常基本的 setInterval,如下所示:
setInterval(function(){
$('.mydiv').remove();
}, 500);
我知道这只是一个客户端代码,但我只是想知道它是否仍然对我的服务器有任何影响?
提前谢谢。
你自己回答你的问题:"我知道这只是一个客户端代码"。它与服务器端无关。您的服务器不知道客户端浏览器中发生了什么。根据 setInterval 的回调函数,它只能影响浏览器性能
上面的 jquery 执行对服务器没有任何影响。 唯一的效果可能是当请求页面并下载 jquery 文件时。jquery 执行完全是客户端的,除非你对服务器进行 ajax 调用或其他内容。
相关文章:
- Intercept the cellSubmit jqGrid
- CSS中的游标属性似乎不适用于USB On The Go
- 如何使用angular js从2个表(在sql server中)中提取数据
- 如何在cloud9中向server.js发送post请求
- Appending the innerhtml of <th>
- jquery in the middle of html
- 使用谷歌地图、C#、ASP.net、SQL Server显示带有标记的地图.地图未显示
- Can't get the tail to wag (animate) in three.js?
- jquery.proxy in the bootstrap-typeahead.js context
- What is the difference between `HTMLImports.whenReady` and `
- 使用Javascript或SQL Server将Outlook电子邮件发送到SQL表
- confuse about the parentNode
- momentjs toISOString without the "z"
- 在 api 文档中 socket.io“Server(srv:http#Server, opts:Object)”是什么
- 在引导程序中从 HTML 表单执行 Python (CGI) 文件.带有Apache Server的JS
- toDataURL(), from the Web onto my Computer
- JavaScript Get the child id
- ExpressJS Server - 如何处理多个域
- 当我关联runat=“server”属性时,JQuery UI 按钮集在单选按钮上不起作用
- jQuery: setInterval effects on the server?