For Firefox
☰ (hamburger menu)->More->Work Offline
Google Chrome doesn’t appear to have this feature
Edit:
Also, another alternative is slightly more time-consuming to setup in the beginning but might be worth it. For Firefox/Chrome there should be proxy plugins, set up a fake/bad profile for each so that you proxy to something that doesn’t exist… like 127.0.0.20:8080. After that you can switch the proxy setting on and off to emulate a full-stack test.