offline.js实现浏览器端网络断线恢复状态检测效果代码
代码语言:html
所属分类:其他
代码描述:offline.js实现浏览器端网络断线恢复状态检测效果代码,自动抓取连接关闭时发出的 ajax 请求并重新生成它们 连接恢复后。
代码标签: offline.js 浏览器 网络 断线 恢复 状态 检测
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/offline.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script type="text/javascript"> $(function(){ Offline.options = { // Should we check the connection status immediatly on page load. checkOnLoad: false, // Should we monitor AJAX requests to help decide if we have a connection. interceptRequests: true, // Should we automatically retest periodically when the connection is down (set to false to disable). reconnect: { // How many seconds should we wa.........完整代码请登录后点击上方下载按钮下载查看
网友评论0