Does Firefox have an offline throttling mode/disable network feature?
Asked Answered
M

5

40

I'm doing some front end work and I need to test how the program reacts when it loses a network connection. Firefox has a "Work offline" setting but that drops the connection for every tab -- I only want to disable the network connection for a single tab. Chrome has this with an "Offline" checkbox in the Network tab of the devtools that makes this really convenient.

This is what this feature looks like in Chrome:

Chrome screenshot

Menis answered 23/1, 2018 at 3:26 Comment(0)
F
3

Firefox supports this natively since v120. Source: https://connect.mozilla.org/t5/ideas/please-add-offline-to-network-throttling-options/idc-p/45653/highlight/true#M26404.

enter image description here

Frolic answered 9/12, 2023 at 8:36 Comment(2)
Just needed this 6 hours after you answered, thanks, this should be the accepted answer. Looks like the request payload is not available though? Testing it right now while commentingLug
Looks like this… Since it's a rather recent feature of Firefox (offline throttling), let's expect it to be polished in some time.Frolic
T
30

EDIT: Since December 2023, there is the offline option available in the throttling tab:

enter image description here

The best solution I've found is to use "Request Blocking". Add * to match all requests. It also blocks local requests.

enter image description here

Tolson answered 3/6, 2021 at 15:25 Comment(3)
This doesn't work if you are testing a site with a service worker and offline capabilities. When genuinely offline, the browser can still route requests through the service worker, but this solution blocks those requests as well. Using File > Work Offline, as per my answer below, is probably best in this situation.Op
This solution also appears to make the request hang indefinitely rather than fail due to lack of connection.Seneca
Note that requests already initiated doesn't appear to be blocked. Only subsequent requests are blocked,Rance
D
23

As of at most v97, work offline can be found by clicking File > Work Offline in the top left of the window. If you do not have the File menu, try pressing alt to make it appear.

As commentators note, this apparently allows requests to localhost, and will set all of your tabs to offline mode.

Greg has a much better answer

Duplex answered 12/5, 2018 at 4:3 Comment(4)
Your bug is marked as duplicate. Vote for this one: bugzilla.mozilla.org/show_bug.cgi?id=1310986, and bugzilla.mozilla.org/show_bug.cgi?id=1156659,Comfy
I think this is not what the OP was asking for; this is same as the File -> Work Offline option (it enforces offline mode for all tabs, not just a single one)Del
This is not correct, not only does it set all tabs to offline as @JanakaBandara pointed out, but it also it permits requests to localhost so it can't be used in development.Tyndale
@RhysvanderWaerden I'm not sure how I missed that in the answer, will update.Duplex
L
5

Yes we do have the option in firefox

version: 65.01

  1. Click on the setting button(hamburger)

step one

  1. Then click the web developer option

step 2

  1. Then click on the work offline option enter image description here
Limitative answered 20/2, 2019 at 5:18 Comment(1)
Still allows localhost to work while other sites are offline (Firefox Dev edition v71)Glass
F
3

Firefox supports this natively since v120. Source: https://connect.mozilla.org/t5/ideas/please-add-offline-to-network-throttling-options/idc-p/45653/highlight/true#M26404.

enter image description here

Frolic answered 9/12, 2023 at 8:36 Comment(2)
Just needed this 6 hours after you answered, thanks, this should be the accepted answer. Looks like the request payload is not available though? Testing it right now while commentingLug
Looks like this… Since it's a rather recent feature of Firefox (offline throttling), let's expect it to be polished in some time.Frolic
O
1

For at least Firefox v92 (and probably previous ones) offline mode can be found by pressing ALT to bring up the File/Edit/View etc menus, then File > Work Offline.

Op answered 8/9, 2021 at 10:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.