问题标签 [offline-browsing]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - Ember js network connectivity check at startup and listener
First off, I'm aware of this question, Display online and offline (e.g. airplane) mode in an Ember.js App but that does not solve all the issues I'm having. The answer to that question uses Heyoffline.js, which is a great library (it's what JSbin uses), but it does not check the connection status on "startup" of an Ember app, only if I turn off my wifi while I'm using the app. I am creating an offline/online compatible Ember app, I just need to know what the status is on startup and I need full control of the "guts", meaning UI, views, etc...Heyoffline.js does too much of that for you.
Very simply put, I need to fire up an Ember app:
view.js
application.hbs
There is a lot more to my application than that, but I think I've pulled out all the pertinent parts. I'm not saying it has to be done like this at all, the only requirements I have are:
- Has to check and set "something" at startup so I can show a message if needed. I'm not saying it has to deferReadiness or anything, from a UX/UI perspective the message can pop up once the App is "ready" or the run loop has finished.
- I have to have control over the message UI and it has to be "Emberized", (I'm thinking a view or component), it's going to be a slide-down from the top element (like Facebook mobile connection warning).
- Has to have some sort of listener (if I lose my connection, I can pop up the little message) - Heyoffline.js does this wonderfully
- Has to be Emberized - must work "the ember way", maybe Ember.Evented or some Pub/Sub setup. I can hack it in, trying not to do that.
- Would love it to be a little more foolproof than window.onLine - that only really checks if you are connected to a LAN or router, not "really" checking internet
- I am in a very specific environment, Webkit specifically, I don't need IE or old browser support.
- I have no other pre-reqs, I'd be fine trashing my current setup entirely.
Any thoughts, suggestions or nuggets anyone wants to share would be greatly appreciated.
java - 在本地缓存 Google AppEngine 文档以供离线使用
离线开发时最大的问题是文档不可用。
Google AppEngine 曾经提供其文档的可下载 tar 球,但似乎不再这样做了。那么如何获得 AppEngine 文档的本地版本,以及在需要时对其进行更新的能力?
javascript - 如果浏览器离线,请避免自动刷新浏览器
我有一个显示广告的网页。页面根据用户输入刷新,例如 60 分钟。因此,如果在一小时结束后要显示新广告,页面将自行刷新(使用 JavaScript)并显示新广告。
$tvout_refresh
是 60 分钟。
现在,我遇到了一个小问题,如果网页离线,页面将在计时器用完(60分钟,刷新)后重定向到浏览器的离线页面(表示无法访问网站的页面)这页纸)。
经过一番搜索,我看到了这段代码,让我能够检测浏览器是在线还是离线。
和
现在,无论浏览器是离线还是在线,浏览器只会在我的刷新脚本计时器用完并刷新页面时检测到它是否离线。有没有办法插入一个脚本来确定浏览器离线,跳过刷新,重置计时器并在 60 多分钟后重试,避免浏览器离线页面?
timedRefresh
定义如下:
ios - iOS 7.1.1 Safari 浏览器搞乱在线/离线状态
我对设计用于多个浏览器的网页进行了跨浏览器在线/离线测试。它适用于免费指标:
- 窗口上的事件监听器
- document.body 上的事件监听器
- 轮询 navigator.onLine 变量
我在几个 iOS、Android 或笔记本电脑浏览器上成功使用了这段代码。
在特定的 iOS 7.1.1 设备上它不起作用。我已经成功地在其他 iOS 7.1.1 设备上对其进行了测试,但是在这个特定的设备上,当离线时,几秒钟 (~5) 后所有指标都恢复为“在线”。
我已经在多台设备上进行了测试,但只能在这个特定的设备上重现问题。我使用“飞行保存模式”按钮将其设为离线,不允许使用 wifi 或蓝牙,但几秒钟后,浏览器中触发在线事件,并且 navigator.onLine 变量变为 true……奇怪……
如果您对正在发生的事情有任何线索,我将很高兴与您交流。
如果您使用您的设备测试该页面,请随时发表评论,让我知道它是否适用于您的设备。谢谢
html - 在 Web 应用程序中存储大文件以供离线访问
我有一个要求,Web 应用程序需要存储大约2 GB的各种格式的文件以.htm, .pptx,.docx, etc.
供离线访问。
在 HTML5 中实现此要求的最佳方法是什么?
caching - 如何缓存为离线 Web 体验拨打的每个电话
我要去没有互联网连接的山上展示一些东西。我希望能够使用交互式示例,因为我将在某个网站上进行演示。
那么有没有一种方法可以设置代理缓存服务器或其他东西来缓存每次调用,以便在没有互联网连接的情况下获得完全缓存的网站体验?
我查看了http://squidman.net/但我不确定它是如何工作的或如何使用它。
java - 如何运行 Java 项目
我的一个朋友曾经给我一个离线浏览器上的 Java 项目。它包含所有类文件以及 Java 源代码,但我不知道如何运行它或如何检查它是如何工作的。它不包含任何数据库或小程序。请帮忙
javascript - 是否可以在 javascript 中离线提供用户创建的内容?
我的应用程序为用户创建的用于电子学习的 HTML 页面包(也称为 SCORM 包)提供服务,我正在努力使其尽可能快。
在 iframe 中逐页加载非常慢,因为页面可能包含高分辨率图形、动画、音频、视频等。
不幸的是,预加载这些页面非常困难,因为它们通常会响应 onLoad() 事件来启动动画和交互。
如果不使用小程序或扩展,是否可以下载用户包并将其“在浏览器中”提供给应用程序?
c# - WebBrowser 控制 - 进入并保持离线模式
我想手动将 HTML 加载到 Web 浏览器控件中,并确保它不会产生任何 Internet 流量,因此只需尽其所能显示内容即可。
如 MSDN 中所述,WebBrowser.IsOffline是只读的。
有没有办法设置它(不使用反射黑客)?
或者我是否必须为此使用第 3 方控件: