What are the four parameters used for jQuery Ajax method?

One of my site visitor asked this question via email so that I am going to what are the four parameters used for jQuery Ajax method call. We need to add four mandatory parameter while doing  Ajax call using PHP and jQuery.

Following are the list of those four parameters:

  1. URL – Need to specify the URL to send the request
  2. type – Specifies type of request(Get or Post)
  3. data – Specifies data to be sent to server
  4. Cache – Whether the browser should cache the requested page

The jQuery library provides a few different methods to perform AJAX calls, although here we’ll look at the standard ajax method, which is the most often used.

Take a look at the following example.

Ajax call using PHP and jQuery example

Below is the complete example of Ajax call using PHP and jQuery.


If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.