How can I disable internet connection or work offline
like Firefox in Chrome? I need to check some errors when Internet is not available.

- 4,785
- 5
- 52
- 76
-
3Great question. I'd like to check if my HTML5 app works with offline-use and I don't want to turn off my entire internet connection, just disable it for the one page I'm viewing. – bafromca Feb 18 '14 at 18:00
-
2possible duplicate of [Does Chrome have a "Work Offline" option?](http://stackoverflow.com/questions/16091243/does-chrome-have-a-work-offline-option) – Goodwine May 05 '14 at 21:06
4 Answers
offline
mode is added to Chrome v45.
Developer tools -> Network tab -> Choose "offline" from selectbox.

- 4,785
- 5
- 52
- 76
-
37
-
but, only current debugging page offline, other tab(pages) still online. – yurenchen Feb 18 '17 at 12:09
-
great solution! but is there any easy way to access this option or any addon? – ir-tech Mar 06 '17 at 22:15
-
4this solution doesn't keep the debugging page from sending network packets. – corporateAbaper Jun 01 '18 at 17:31
-
6**this disables access to `localhost` too**. So technically it's not "no Internet" it's "nothing" – Alex from Jitbit Oct 18 '20 at 20:00
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.

- 865
- 10
- 14

- 830
- 6
- 10
Under the network tab, go to the THrottling dropdown where you can select different speeds of web and even set it to be offline. This comes very handy when you are working with service workers and want to test your application in offline mode.
Refer to the latest answer: https://stackoverflow.com/a/32607960/2520254

- 864
- 11
- 30
-
Won't work for existing websocket connections: https://stackoverflow.com/questions/38729050/chrome-disabling-web-sockets-or-closing-a-web-socket-connection – ᴍᴇʜᴏᴠ Apr 23 '22 at 08:32
Until Chrome has a feature to disable internet but retains localhost (or local network) connections. The only way I could suggest is to just disconnect the network from the internet manually for your testing.

- 1,332
- 2
- 17
- 31