AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Random Recent Topics Widgets – Disable AJAX Loading for Better Performance

1 Posts
1 Users
0 Reactions
5 Views
Posts: 19
Topic starter
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@lucky)
Eminent Member
Joined: 2 years ago
[#73336]

Title: Random Recent Topics Widgets – Disable AJAX Loading for Better Performance

Hello,

I am using approximately 10–12 Recent Topics widgets with random sorting across multiple forum boards. These widgets are extremely valuable for internal linking, SEO and visitor engagement.

However, following an extensive investigation into CPU spikes on my dedicated server, I discovered that these widgets generate a considerable number of separate AJAX requests, even when the main page is fully cached.

Some findings:

  • Approximately 102 WPForo AJAX requests per minute.

  • Individual widget requests sometimes take 6–12 seconds.

  • PHP-FPM periodically consumes 100% of available CPU capacity.

  • The AJAX action is wpforo_load_ajax_widget_RecentTopics.

My website currently receives approximately 600,000 page views per month, so the additional server workload is substantial.

Is there a setting, PHP filter or code snippet that would allow the Recent Topics widgets to be rendered directly into the page HTML, rather than being loaded separately through AJAX?

This would allow WP-Optimize to cache the widget output together with the rest of the page.

I have absolutely no objection to the random topics remaining unchanged until the page cache is regenerated.

Ideally, I would like to retain all existing widget functionality, including random sorting and multiple forum board support, while eliminating the separate AJAX requests.

All my widgets already have the Auto Refresh Interval set to 0. However, each widget still generates a separate AJAX request upon the initial page load. What I would like to disable is the initial AJAX loading, not the automatic refresh, which is already disabled.

Thank you!

Lucky

https://gogohugs.com/  


Share: