Does Chrome have a “Work Offline” option?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 11:02:36

问题


I'm trying to test out my fallback page in my html5 cache manifest. I'd rather not have to actually disconnect from the internet in order to do it. I've heard that it doesn't work quite right in Chrome, so I need to test it specifically. Does Chrome have the ability to work offline? I've searched through the settings and the available extensions, and I can't find anything.


回答1:


It looks like Chrome now has this feature via Chrome developer tools (Ctrl-Shift-I). Click on the "Device Mode" icon at the top-left. Now, a device and network bandwidth and latency (or completely offline) can be simulated using the dropdowns at the top of the screen:

The screenshot above is from Chrome Version 42.0.2311.60 beta (64-bit) on Linux.

NOTE: As of Apr 2015, unfortunately this does not affect Websocket connections, which continue to operate regardless of the Network setting. See https://code.google.com/p/chromium/issues/detail?id=423246.




回答2:


Chrome has a flag called "Enable Show Saved Copy Button".
Find the flag by visiting the URL chrome://flags/#show-saved-copy

Enable Show Saved Copy Button
When a page fails to load, if a stale copy of the page exists in the browser cache, a button will be presented to allow the user to load that stale copy. The primary enabling choice puts the button in the most salient position on the error page; the secondary enabling choice puts it secondary to the reload button.

Note that this flag used to be called "Enable Offline Load Stale Button".

Gmail also has an offline option. Gmail Offline is a Google Chrome app that lets you read and manage messages when you don’t have an Internet connection. You can even compose messages that will be sent when you’re back online.




回答3:


Google chrome itself does not have this feature, however, I've found this page to do exactly just that with an extension.

http://techlogon.com/2013/01/25/how-to-work-offline-in-google-chrome/

It works by routing chrome traffic to a proxy that you specify where there are no proxy, and therefor will not receive any network traffic.




回答4:


Offline switcher is a new handy Chrome Extension to do the job quickly. You can toogle to switch between offline and online mode.

The add-on is simple, just to set Chrome proxy to an un-existing point.




回答5:


As far as I am aware, Google Chrome does not have a work offline option, so disconnecting from the internet is the only way I can imagine doing it.




回答6:


here are a few related chromium bugs

Devtools feature request: Toggle network throttling profiles with keyboard shortcuts https://code.google.com/p/chromium/issues/detail?id=511152

DevTools: Online/Offline events not being fired in device emulation https://code.google.com/p/chromium/issues/detail?id=422956

If you are using Firefox, the Work Offline extension is very handy https://addons.mozilla.org/en-GB/firefox/addon/work-offline/



来源:https://stackoverflow.com/questions/16091243/does-chrome-have-a-work-offline-option

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!