Skip Navigation

[Resolved] I have multiple views on a few pages, but admin ajax fires 8 times

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 1 year, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2623281
Screenshot 2023-07-12 at 11.36.47 AM.png

I am trying to: eliminate the accessive triggering of ajax

Link to a page where the issue can be seen: hidden link

I expected to see: inside the developer tools > network I noticed 8 separate triggers for ajax. I only need to see 1

Instead, I got: triggered 8 ajax requests

#2623541

Hi,

Thank you for contacting us and I'd be happy to assist.

From the page's code it seems that there are two different views used on it.
( view IDs: 7451 & 7583 )

To troubleshoot this, I'll need to see how these views are set up in the admin area. Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2624917

Thank you for sharing the access details.

There are total of 5 views used on that page. The AJAX requests that are initiating on the page load are coming from the views which have pagination options enabled on them.

To limit those AJAX requests, you can go to advanced pagination settings in those views, and limit the number of pre-loaded pages.
( screenshot: hidden link )

The more number of pages set for pre-loading, the more AJAX requests will be needed in the background.