Help Center

How to Set AJAX Request Type

How to Set AJAX Request Type

Discover more about the AJAX request type used with the filters available with the JetSmartFilters plugin.

Before you start, check the tutorial requirements:

Head to WordPress Dashboard > SmartFilters > Settings. Here open the Ajax Request Type tab to adjust the needed settings.

Let’s find out about all the available options.

jetsmartfilters ajax request type
  • Default — the most standard type that works perfectly with third-party plugins and caching. However, mind that dynamic arguments don’t work with this specific type; 
  • Referrer — the type that sends the request to the same default URL, so it’s pretty similar to the previous one. Its advantage is that it also works with dynamic arguments. Though, mind that not all requests are processed correctly, and it works a little slower than the Default type;
  • Self — the type that sends the request to the current page. All the query arguments will work the same way as on the processed page.
Warning

For static caching, we recommend that you enable the "Don’t cache URLs with GET parameters" setting in the caching plugin you are using. This needs to be done because the original cached page will be displayed after the AJAX filter runs.

Now you can check the filter settings in the editor. So open the needed page in the preferred editor. For instance, let’s look at the Checkboxes Filter settings in Elementor Page Builder.

As you can see, the Apply type is set to “AJAX.”

filter example in elementor

The same settings are available in the Block Editor.

Press the “Publish” button to complete the work with the form.

filter example in block editor

Once the form is displayed on the page, you can select the desired options to filter the content.

filtered content on the front end

Also, check our tutorial on How to Add a Provider Preloader to Filters on the Front End for the “AJAX” Apply type.

That’s it; the filter is working correctly with the AJAX request type adjusted in the JetSmartFilters settings.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.