I implemented a service worker that intercepts requests and can return any error code / data. Great to exploratory testing. See http://glebbahmutov.com/blog/robustness-testing-using-proxies/ and code at https://github.com/bahmutov/service-turtle The bad thing about service workers - they are very fresh. Even in Chrome they did not have a way to communicate back to the main window any result - post message mechanism was broken. I feel soon the problems will be fixed and every website will use them.