1

So I'm building a web app, and I want to emulate a network failure in browser to see if the client side javascript handles it gracefully. I know I can just disconnect my network connection, but that also disconnects my email, pandora, skype, all things that are marginally vital to my non-productivity. Is there an easy way to kill network communication for just one tab in either of these browser? Or (I'm in linux) can I block a single pid from network communication while still allowing the rest (even if it's the same program) through?

Edit: Shoot, I just realized that I'm working on localhost, and that may not apply for what I'm asking for.

Sidney
  • 624
  • 7
  • 20
  • Possible duplicate of [Simulate limited bandwidth from within Chrome?](http://stackoverflow.com/questions/10328568/simulate-limited-bandwidth-from-within-chrome) – Nerdroid Nov 16 '16 at 00:21

2 Answers2

2

Does menu file -> work without connection works for you? It should be in the firefox menu.

José Cabo
  • 6,149
  • 3
  • 28
  • 39
  • That works perfect (I admit, I use chrome and hadn't explored firefox as fully as I should have), thank you =D Edit - Shoot, that would work in theory, but as I'm working with a localhost apache installation, no go. =( – Sidney May 23 '14 at 18:36
  • Oh! That's weird. So sorry anyway :/ – José Cabo May 23 '14 at 18:54
  • It was a good suggestion, just not applicable in this situation. – Sidney May 23 '14 at 20:05
1

You could always use invalid proxy settings! I recall some plugins that let you easily change proxy profiles so you could even have a profile for "dead proxy" and enable ot whenever you want no Internet.

Turns out there are more sophisticated options: a dedicated site blocker for Chrome. That way you could still use other sites that help your non-productivity while still blocking the desired one!

Kostas Rousis
  • 5,918
  • 1
  • 33
  • 38