admin管理员组文章数量:1389903
I've just entered a load of data into a site that I'm testing. I don't want to enter it again, but want to go for lunch, and the session will have expired by the time I get back.
A bookmarklet would be handy (as this situation occurs often) to keep refreshing the page, every minute or so.
Any ideas?
Thanks.
I've just entered a load of data into a site that I'm testing. I don't want to enter it again, but want to go for lunch, and the session will have expired by the time I get back.
A bookmarklet would be handy (as this situation occurs often) to keep refreshing the page, every minute or so.
Any ideas?
Thanks.
Share Improve this question asked May 12, 2011 at 11:19 user542603user5426031 Answer
Reset to default 6This bookmarklet reloads the page every 5min, almost certainly keeping the session active as if you had just opened a new tab; the trick is to reload the page in a separate window/tab as follows.
javascript:_x=setInterval(function(){open(location.href, 'otherWindow')}, 1000*60*5)
You will have to disable your popup blocker / allow the first window to open. Obviously only one new window is created, else this would be a terrible solution.
To test this, merely replace 1000*60*5 with something like 1000*5 (5 seconds).
The user didn't really need it for his use case, but if someone else wants to avoid closing the page, you can just use this bookmarklet to stop the refreshing.
javascript:clearInterval(_x)
本文标签:
版权声明:本文标题:javascript - Bookmarklet to refresh page every minute or so, so I don't lose session data whilst on lunch - Stack Overfl 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744575667a2613608.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论