In some cases, you might decide that the few visitors who can’t execute your AJAX applications are not worth caring about. Sometimes, you don’t care about search engine spiders, particularly if the access to your application is password-protected (example: Gmail). In a majority of scenarios, however, you still have to give HTML-only visitors at least some limited functionality.
You’ll get the best results in AJAX-and-HTML application development if you follow the principles of HIJAX: Plan for AJAX from the start and implement it at the end.
Ideally, you would develop your application in the following major steps:
- Develop individual server-side transactions that return XML data.
- Use XSLT transformations on the server to convert the XML data into HTML pages served to non-AJAX-capable visitors.
- Develop client-side AJAX code that will use the transactions developed in the first step and display the resulting data in dynamic, interactive format.
If you’re willing to ignore fringe browsers that don’t support XSLT, you could even reuse the XSLT transformations developed in the previous step to transform the XML data into HTML markup on the client.