Home > Articles > Programming > Java

How to Secure AJAX Requests

  • Print
  • + Share This
It's always important to implement some sort of security model in your database-enabled AJAX applications, says Kris Hadlock. Otherwise, you leave your database completely exposed. In this article, he shows a relatively simple procedure for including password verification in an AJAX/database interaction.
From the author of


When integrated with a database, AJAX can accomplish some extremely powerful interactions that are unique to the set of languages it encompasses. "With great power comes great responsibility," however, and database-integrated AJAX is no exception to this rule. To protect our database from unwanted requests, we need to have an interaction model that verifies the source of the request based on a password. In this article, we’ll cover how to create a password-protected AJAX request from the client side that’s verified on the server side before any database interactions occur. We’ll use PHP to create our unique passwords on the client side and also to verify them on the server when the AJAX requests are made.

  • + Share This
  • 🔖 Save To Your Account