This topic created in 3889 days ago, the information mentioned may be changed or developed.
比如设置一个 24 小时的倒计时,结束的时候刷新一下本页。
这个方案是否可靠? js 能活那么长时间吗?
我就想每天 8 点刷新一下一个页面,除了这个,还有什么可靠方案?
例如
<head><meta http-equiv="refresh" content="86400"></head>
或者
window.setTimeout("window.location='index.shtml'",86400*1000);
12 replies • 2015-10-02 03:56:25 +08:00
 |
|
1
jjplay Oct 1, 2015
感觉没啥问题,估计会有秒数的差距
|
 |
|
2
wolfan Oct 1, 2015
那也要开着 Web 才可以吧?
|
 |
|
3
kchum Oct 1, 2015
你开着电脑浏览器,就为这么一刷?
|
 |
|
4
yeyeye Oct 1, 2015
setTimeout 每秒检测一次当前时间,然后做判断
|
 |
|
5
LWXYFER Oct 1, 2015
上面大家问过了,你要一直开着浏览器吗?
|
 |
|
6
abcdabcd987 Oct 1, 2015
如果只是访问网站,不要求执行 js 的话,用 cron + curl 就行了呀
|
 |
|
7
dong3580 Oct 1, 2015 via Android
websocket 推送给前端,后端没 24 小时推送一次。
|
 |
|
9
shsf4 Oct 1, 2015
js 获取当前时间,如果是 8 点的话刷新
|
 |
|
10
wibile Oct 1, 2015
selenium 啊,随便写个脚本就成。。。
|
 |
|
11
likuku Oct 1, 2015
ifttt 可以么?
|
 |
|
12
nikoukou Oct 2, 2015
casper.js+crontab could fullfill your requirement.
|