Last year I was the maintainer for jQuery-Mockjax (https://github.com/appendto/jquery-mockjax) which essentially mocks jQuery's ajax calls. Makes it really easy to test these kinds of conditions on the client without needing to set up a server.
IIRC it also supports simulated response delays. You'll never know the difference!