Search code examples
firefoxsafarihtmlgoogle-chrome

Simulate Offline Mode for HTML5 Cache Testing


I have an HTML5 application that requires offline support. For running the application, I use a local Apache server. I am trying to figure out what the best way is to simulate offline mode.

Currently, in Firefox I disable my Air-Port to simulate offline mode, but this is a pain.

Any suggestions? I am open to using other browsers, if a method exists that doesn't require turning off my Internet.


Solution

  • 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.