>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Checking browser compatibility for Ajax - ajax browser web request javascript compatibility browsers object

 
Registered tutorials: 501
Registered Users: 36958



Rating: 5 out of 1 votes cast


  
Category: Technique Introduction

Checking browser compatibility for Ajax

Digg this   Post to del.icio.us

Abstract: This introduction tutorial shows how to check that browser is compatible for Ajax

You designed a cool Ajax application and made sure the engine behind Ajax's server handshake is set up well. What next? Browser compatibility is a very important consideration in Ajax-based web development. This is because Ajax applications are tough on most non-compatible browsers, and your visitors from the old world will not be pleased with the way your screen renders when using Ajax.

The way out is to use JavaScript to weed out the unsupported browsers.

It is time to call up the versatile programming object XMLHttpRequest that allows Ajax applications to make HTTP requests to a server. It is this same object that we will use within this JavaScript code.

XMLHttpRequest is good only for the progressive browsers such as Firefox, and Safari. If you are programming for IE, you have to call up a different object such as Microsoft.XMLHTTP or Msxml2.XMLHTTP. IE 7 users don't need to despair, though. The request XMLHttpRequest is supported by this advanced browser.

The steps involved are simple: include the compatibility check inside a JavaScript function, then call this function before you make any HTTP requests using the object. Let us look at an example for Mozilla-based browsers:

if(window.XMLHttpRequest){
request = new XMLHttpRequest( );
request.onreadystatechange=handleResponse;
request.open("GET",theURL,true);
request.send(null);
}


Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 218
Unique Hits: 194


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.3 0.3 0.9 0.9 8 8.9
Current 1 1 3 3 3 3
Previous 1 1 0 0 6 6
Feb 4 0 0 3 3 12 13
Feb 3 0 0 0 0 7 8
Feb 2 0 0 1 1 13 14
Feb 1 0 0 0 0 10 11
Jan 31 1 1 1 1 6 6
Jan 30 0 0 1 1 11 13
Jan 29 0 0 0 0 12 15
Jan 28 0 0 0 0 0 0
Highest 6 7 8 9 17 17


Script Execution Time: 0.12671 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2