Forums

[Plugin: WP-Table Reloaded] Inline CSS (2 posts)

  1. endolil
    Member
    Posted 2 years ago #

    Hi,

    this plugin is very handy and really usefull. Thank you for sharing!

    There is one thing I do not like about it.
    There is an inline css style I cannot remove.
    <caption style="...">

    Inline CSS should be avoided on big pages because it slows down the rendering performance of a page.
    You can read about this issue here.

    Imagine that someone has 10 tables on one page (like me for a restaurant menu). There comes a lot additional code only for the inline style.

    I will appreciate a lot if you can delete the inline CSS in the next version. I think there is no real need for that. A cleaner solution is an external CSS file like the one you already have in use.

    Best regards,
    Sebastian

  2. TobiasBg
    Member
    Posted 2 years ago #

    Hi,

    thanks for your comment!

    The inline style in the caption that you mention is for showing the "Edit table" link next to a table, to users who are allowed to do that.

    It will never be visible to regular visitors of your site, but only to logged in users that have the necessary capability to edit a table (can be set on the "Plugin Options" screen of WP-Table Reloaded). Thus, the "performance slow down" (which I doubt is measurable at all) would only affect those users. Putting the CSS into an external file would require an additional HTTP request which is even more expensive. Putting it into the already existing table CSS is also not an option, because the inclusion of those files can be disabled by the user, and even worse, the CSS would be loaded although it does not have any effect (because the caption is not shown to regular visitors).

    If you are still bugged by that inline CSS, you can turn off the inclusion of the caption (and the "Edit table" link) in the "Plugin Options".

    I hope you can follow this reasoning and understand why the inline CSS is necessary and will not be removed.

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Topic