Title: codingninja's Replies - page 2 | WordPress.org

---

# codingninja

  [  ](https://wordpress.org/support/users/codingninja/)

 *   [Profile](https://wordpress.org/support/users/codingninja/)
 *   [Topics Started](https://wordpress.org/support/users/codingninja/topics/)
 *   [Replies Created](https://wordpress.org/support/users/codingninja/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/codingninja/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/codingninja/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/codingninja/engagements/)
 *   [Favorites](https://wordpress.org/support/users/codingninja/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)

[←](https://wordpress.org/support/users/codingninja/replies/?output_format=md) [1](https://wordpress.org/support/users/codingninja/replies/?output_format=md)
2

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Perfect OneDrive Gallery & File] performance issue](https://wordpress.org/support/topic/performance-issue-8/)
 *  [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/performance-issue-8/#post-5547587)
 * I 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Perfect OneDrive Gallery & File] performance issue](https://wordpress.org/support/topic/performance-issue-8/)
 *  [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/performance-issue-8/#post-5547529)
 * leberwurst79, 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Perfect OneDrive Gallery & File] New features/options requests](https://wordpress.org/support/topic/new-featuresoptions-requests/)
 *  [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/new-featuresoptions-requests/#post-4783787)
 * Piotr, what about caching? Is there any way to add a feature to served cached
   images?
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [subdomain logout when accessing wp-admin](https://wordpress.org/support/topic/subdomain-logout-when-accessing-wp-admin/)
 *  Thread Starter [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/subdomain-logout-when-accessing-wp-admin/#post-5550763)
 * Thanks 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Perfect OneDrive Gallery & File] performance issue](https://wordpress.org/support/topic/performance-issue-8/)
 *  [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/performance-issue-8/#post-5547481)
 * It 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Perfect OneDrive Gallery & File] New features/options requests](https://wordpress.org/support/topic/new-featuresoptions-requests/)
 *  [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/new-featuresoptions-requests/#post-4783784)
 * Faster load times would be nice.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Perfect OneDrive Gallery & File] performance issue](https://wordpress.org/support/topic/performance-issue-8/)
 *  [codingninja](https://wordpress.org/support/users/codingninja/)
 * (@codingninja)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/performance-issue-8/#post-5547475)
 * It’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.

Viewing 7 replies - 16 through 22 (of 22 total)

[←](https://wordpress.org/support/users/codingninja/replies/?output_format=md) [1](https://wordpress.org/support/users/codingninja/replies/?output_format=md)
2