SHORTINIT for fast ajax
-
Hello, I’m still using an old modded by me version of this plugin which was the best for pop.posts imho and probably still is.
One modification I made and maybe you want to consider implementing was to use the SHORTINIT constant in the ajax call made to update the view counter. That constant is used by WordPress to reduce the high load of an ordinary wp-load.
In a site of mine I was using wp-super-cache to reduce server load but the effort was almost obliterated by the ajax calls that are not cached for obvious reasons.
Using a separate php file wpp-fast-ajax.php in the plugin directory for the ajax call like:
ini_set(‘html_errors’, 0);
define( ‘SHORTINIT’, true );
require_once dirname( __FILE__ ) . ‘/../../../wp-load.php’;function wpp_update( )
{
global $wpdb;
….
}
wpp_update( );helped a lot.
https://www.ads-software.com/plugins/wordpress-popular-posts/
- The topic ‘SHORTINIT for fast ajax’ is closed to new replies.