codingninja
Forum Replies Created
-
Forum: Plugins
In reply to: [Perfect OneDrive Gallery & File] performance issueI found a somewhat okay solution with client side caching, but the user would have to load the gallery pages once before it becomes faster. The best solution would be server side caching, which I’m unsure how to implement. If anyone can point me in the right direction, that’d be great. Thanks in advance.
I used this script to substitute admin-ajax.php basically, and edited the Perfect OneDrive plugin to use my own ajax.php rather than admin-ajax.php. I put it in the root directory of my website.
<?php //mimic the actual admin-ajax define('DOING_AJAX', true); if (!isset( $_REQUEST['action'])) die('-1'); //make sure you update this line //to the relative location of the wp-load.php require_once( dirname( __FILE__ ) . '/wp-load.php' ); //Typical headers header('Content-Type: text/html'); send_nosniff_header(); //Enable caching $expires = 60 * 999999999999999999999999999999999999999; header('Pragma: public'); header('Cache-Control: maxage=' . $expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT'); $action = esc_attr(trim($_REQUEST['action'])); //A bit of security $allowed_actions = array( 'pweb_onedrive_download_file', 'pweb_onedrive_display_photo' ); if(in_array($action, $allowed_actions)){ if(is_user_logged_in()) { do_action('wp_ajax_'.$action); } else { do_action('wp_ajax_nopriv_'.$action); } } else { die('-1'); }
Forum: Plugins
In reply to: [Perfect OneDrive Gallery & File] performance issueleberwurst79, were you able to make the onedrive images load faster with WP fastest cache? If so how much faster? It seems I can’t use it with WordPress multisite, but it may be something to look into, with another caching plugin.
Forum: Plugins
In reply to: [Perfect OneDrive Gallery & File] New features/options requestsPiotr, what about caching? Is there any way to add a feature to served cached images?
Forum: Networking WordPress
In reply to: subdomain logout when accessing wp-adminThanks Marc. I ended up removing my iThemes Security plugin and that fixed the issue. It had been blocking me, as I had looked at my database log entries from that plugin and it had said users have been blocked.
Forum: Plugins
In reply to: [Perfect OneDrive Gallery & File] performance issueIt takes 2-6 seconds for one image to load. If there are more than one image, each image adds up. Normally it takes one second, or less to load all the images on a page, even using Flickr integration. I’m not sure how to help though. I know OneDrive itself is pretty fast. Maybe caching the ajax requests on the server may help.
Forum: Plugins
In reply to: [Perfect OneDrive Gallery & File] New features/options requestsFaster load times would be nice.
Forum: Plugins
In reply to: [Perfect OneDrive Gallery & File] performance issueIt’s also very slow for me too. I’m just testing this plugin out for now. I love everything about this plugin except that it’s very slow. It seems to be running a lot of ajax requests on admin-ajax.php. Each image is an ajax request. I wonder if there’s a better way to go about this, though I don’t know of any myself. It’s all new to me.