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:
To turn on Offline Mode using the menu bar, select “Work Offline” from the “File” menu in the menu bar. A check mark displays to the left of the Work Offline option to indicate it's enabled. The second method of enabling the Offline Mode in Firefox is in the Developer menu.
Offline Mode removes Firefox's connection to the internet, instead fetching all information from the browser cache. While online, Firefox will automatically save websites you browse as cached web content.
The toolbar includes a Throttling dropdown, which allows you to throttle your network speed to emulate various different network speed conditions. Choose an option from the menu, and it will persist across reloads.
Developer tools -> Network tab -> Choose "offline" from selectbox.
~~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
The best solution I've found is to use "Request Blocking". Add *
to match all requests. It also blocks local requests.
Yes we do have the option in firefox
version: 65.01
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With