HTTP Headers, Errors, and Server Communication

Communicating errors back to the client is vital in any AJAX application. Many different types of errors can happen with asynchronous HTTP communication and the distributed nature of n-tier applications. The data being sent may get scrambled; requests might be made by unscrupulous persons for functionality that doesn’t exist; the database, database server, or internal network may go down; and so on. Each of these types of problems can and eventually will happen. To compensate for this, error communication is required.

Good error communication requires planning just as writing code does. Decisions must be made regarding how much information to send the user and what information will be helpful to ...

Get Oracle Database Ajax & PHP Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.