Site performance down with Ninja Tables
-
This issue https://www.ads-software.com/support/topic/site-performance-down-with-ninja-tables/ is not resolved.
What can you do with fonts? i setup “theme fonts” into table configuration and so i don’t need this fonts. This fonts degrade my site performance. I can’t remove that font because the implementation is one of the worst code i ever seen.
Call this function:
function ninjaTablePreloadFont() { add_action('wp_head', function () { $preloadFontUrl = NINJA_TABLES_DIR_URL . "assets/fonts/ninja-tables.woff2?" . NINJA_TABLES_PRELOAD_FONT_VERSION; ?> <link rel="preload" as="font" href="<?php echo esc_url($preloadFontUrl) ?>" type="font/woff2" crossorigin="anonymous"> <?php }, 99); }
Into this method :
/** * Enqueue main public css. */ public static function enqueuePublicCss() { $styleSrc = NINJA_TABLES_DIR_URL . "assets/css/ninjatables-public.css"; if (is_rtl()) { $styleSrc = NINJA_TABLES_DIR_URL . "assets/css/ninjatables-public-rtl.css"; } wp_enqueue_style( 'footable_styles', $styleSrc, array(), self::$version, 'all' ); ninjaTablePreloadFont(); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Site performance down with Ninja Tables’ is closed to new replies.