Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Disabling AJAX support in Browser

Posted on 2006-10-22
5
Medium Priority
?
623 Views
Last Modified: 2008-01-09
Hello,

I am working an a script that uses AJAX if available, but otherwise uses a refresh.

I want to test it, but all my browsers support AJAX.....

Is there a way to disable XMLHttpRequest in my browsers, or in some other way make my browser support JavaScript but not AJAX?

Thanks!
0
Comment
Question by:hankknight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 53

Assisted Solution

by:Ryan Chong
Ryan Chong earned 300 total points
ID: 17784250
>>Is there a way to disable XMLHttpRequest in my browsers, or in some other way make my browser support JavaScript but not AJAX?

simply set a js variable when you're debugging your scripts, so that it ALWAYS will not execute the AJAX portion, like this:

<script language="javascript">

//Variable to set during debugging
var isDisableAJAX = true;

if (isDisableAJAX) {
   //do whatever..
} else {
   //do XMLHttpRequest..
}

</script>


else you may really think to uninstall the XMLHttpRequest component from your PC, but I think it's not worth to try with. Hope this makes sense to you.
0
 
LVL 13

Assisted Solution

by:jeebukarthikeyan
jeebukarthikeyan earned 300 total points
ID: 17784333
hi,

try disabling javascript and try

b u d d h a
0
 
LVL 41

Accepted Solution

by:
HonorGod earned 1200 total points
ID: 17784614
If you are using something other than IE, you might try creating your own (XMLHttpRequest "object"), so when an attempt is made to
create an object, it won't allow Ajax to be performed.

0
 
LVL 12

Assisted Solution

by:str_kani
str_kani earned 200 total points
ID: 17786897
check this out...

 if (Ajax.getTransport()) {
  // Do Ajax...  Or save to a cookie..
  // Or even to the db and serve content accordingingly in the future..
 }

http://forum.openrico.org/topic/421
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 17805757
Thanks for the 'A'
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question