Disable XMLHTTPRequest

acme on 2006-01-16T11:51:54

Dear Lazyweb, I have a website which uses XMLHTTPRequest. I can test it by hand in Firefox, I can test it without JavaScript in Firefox, but I can't test it with JavaScript but without XMLHTTPRequest. Is there an easy way to do this, short of recompiling Firefox?

Many thanks, I shall owe you a drink...


Re: Disable XMLHTTPRequest

Adrian on 2006-01-16T13:01:49

What I normally do is isolate all uses to a single function and then mock it out during testing the non-JS version.

Failing that - I guess doing

window.XMLHttpRequest = nil
will probably do the job?