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.
-
3Chrome does offer [a way to view cached webpages](http://superuser.com/questions/459196/is-it-possible-to-work-offline-in-google-chrome-as-in-firefox), but unfortunately doesn't actually have a "Work Offline" option. There's an open feature request for the feature; you can [vote](http://superuser.com/a/621633/113306) for it if you like. – unforgettableidSupportsMonica Jul 19 '13 at 05:22
-
This question has also been answered on superuser.com: http://superuser.com/questions/459196/is-it-possible-to-work-offline-in-google-chrome-as-in-firefox – Anderson Green Apr 10 '15 at 18:10
6 Answers
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.
UPDATE Sep 2021: It looks like the network settings will finally affect websocket connections as of Chrome 96. See the issue above for details.

- 17,606
- 5
- 95
- 112
-
4This doesn't quite work the way I'd expect. For instance I cannot access localhost. This is rather frustrating, because you may want to disable Chrome to make remote requests while working on a train or something. – tbranyen Apr 14 '15 at 22:14
-
The 'Offline' option does in fact block the websockets used by Meteor (DDP), FYI. Not sure when that started to be true. – ABCD.ca Jul 03 '15 at 17:29
-
2@tbranyen I think that's a feature, not a bug -- if I'm testing offline capabilities of my application hosted on localhost, I'd want Chrome to prevent access to it. However, it'd be nice if it was more configurable. – Raman Dec 17 '15 at 20:41
-
2I think this is much more faster: https://chrome.google.com/webstore/detail/offline-switcher/klpkdojcmgnmoikmlacpnjkmjlfhgeje – Duong Nguyen Jan 27 '16 at 12:20
-
-
@Raghav Hopefully I have time time to work on that this week, release soon. – Duong Nguyen Oct 04 '17 at 05:25
-
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.
-
1Chromium 87 does not seem to have the flag `chrome://flags/#show-saved-copy`, did they change the name? – baptx Nov 22 '20 at 20:34
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.

- 1,552
- 1
- 17
- 26
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.

- 830
- 6
- 10
-
so this will let me re-browse all pages I visited as long I can direcly click on links I have also previsouly visited? any idea how old pages this cache will keep? – Aquarius Power May 15 '17 at 18:58
-
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.

- 149
- 3
- 9
-
2disconnecting from the internet will not help to viewing offline pages. Offline viewing is a must not a feature and Google chrome is a fault! – Hamid Dec 04 '13 at 05:33
-
@vkoves: is this still the case? Looking for a way to automate starting Chrome in an offline network profile. – u01jmg3 Dec 08 '17 at 06:37
-
@u01jmg3 that can be done through the inspector. Open the Chrome inspector (F12) then go to "Network" and check the "Offline" checkbox. The approved answer says something similar. – vkoves Jan 29 '18 at 05:12
-
@vkoves: thanks for your comment but what you have said is not an automated way of starting Chrome in an offline network profile. The steps you describe would be manual which is of no use in automated browser testing. I had hoped there would be a flag that Chrome would respect. – u01jmg3 Jan 29 '18 at 11:26
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/

- 74
- 1
- 6
-
Old Fox does not need an extension, to make it offline go to File > work offline. – pouya Mar 03 '19 at 06:54