WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Page load time (7 posts)

  1. Andreas Beer
    Member
    Posted 3 years ago #

    Would it be possible to restrict the loading of the plugin elements to posts an pages where the tables are actually used?

    The plugin puts (like other plugins) a considerable amount of elements on the front page and across the entire site which is rather unfavourable in terms of low loading times.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Andreas,

    thanks for your question.

    By default, WP-Table Reloaded will load its CSS files and the jQuery JavaScript library on all pages. The JS libraries for the table features are only loaded if there really is a table on the page.

    Basically, this is, because at the time when CSS and jQuery need to included into the HTML code, the plugin does not yet know whether there will be a table on the page.

    One easy possibility to solve this is to use the "HiFi" plugin, as the user did here (for a slightly different purpose): http://wordpress.org/support/topic/individual-column-filtering?replies=9#post-2110091
    You could use that plugin to only load the CSS on the page with your table.

    Regards,
    Tobias

  3. Andreas Beer
    Member
    Posted 3 years ago #

    Thanks for the fast reply, Tobias.

    Unfortunately, that way doesn't seem to help. I'm not even using the Java libraries on pages with table, they are not the problem (well, problem is a rather big word for a tenth or two of a second).

    My problem are these elements

    <br />
    ...e/wp-content/plugins/wp-table-reloaded/img/bg.gif<br />
    ...e/wp-content/plugins/wp-table-reloaded/img/asc.gif<br />
    ...e/wp-content/plugins/wp-table-reloaded/img/desc.gif<br />
    ...e/wp-content/plugins/wp-table-reloaded/img/back_disabled.jpg<br />
    ...e/wp-content/plugins/wp-table-reloaded/img/back_enabled.jpg<br />
    .../wp-content/plugins/wp-table-reloaded/img/forward_disabled.jpg<br />
    ...e/wp-content/plugins/wp-table-reloaded/img/forward_enabled.jpg<br />

    These little images are loaded on the front page (with no tables) and no special Java library enabled for the front end.

    Again, it's not only you're plugin behaving that way (as you can see here: http://tools.pingdom.com/default.asp?url=http%3a%2f%2fsmmp.de%2f&id=4692965).

    Perhaps a sprite would do some good or an is_singular() instead of a global head or footer injection. Just an idea. I know as much about writing plugins as about Chinese poetry.

  4. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Andreas,

    I'm not really sure, but I believe that these images are loaded because the CSS file of WP-Table Reloaded is loaded (and the files are referenced in that).

    A sprite would definitely be nice, but unfortunately, this would require changes in the DataTables JavaScript library, which I can't do.

    As you are not using the JS library on any table, have you globally deactivated the usage on the "Plugin Options" screen? That way, the CSS file should not be included and thus no images should be loaded.
    After setting the option, you might need to clear the wp-minify cache, as that's where I spotted the CSS code in your site.

    Regards,
    Tobias

  5. Andreas Beer
    Member
    Posted 3 years ago #

    CSS and JS libraries are disabled in the plugin options and any table related CSS is stored in the main stylesheet. Therefore, it's rather weird that these tiny images are still called on the front page. I begin to suspect that wp-minify is doing a better than wanted job in collecting CSS and JS from every corner of the site. So, it's not your plugin, but another one. Thanks again for your quick response, Tobias.

    Ha - got it! Just killed references to those image in the main stylesheet. Oh, I'm such a bum. Sorry, for bothering you Tobias!

  6. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Andreas,

    no problem. It might be that wp-minify (for some reason) included the datatables.css as well, when plugin.css is enough (if you have disabled JS libraries site-wide).
    I don't know how wp-minify works, but if you were able to remove those references, that should do it.

    Best wishes,
    Tobias

  7. xeno010
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic