autoptimize_fitler_css_preload_and_print bug?
-
I’m trying to revert to the old way of deferring CSS to work with a javascript I had written long ago to further delay the CSS from loading but this is leading to some weird output that looks like a bug because there are two link tags being output (excluding the one inside the noscript tag)
My filters
add_filter('autoptimize_filter_css_preload_onload', function() { return "this.onload=null;this.setAttribute('data-loaded', '1');"; }, 10, 0); add_filter('autoptimize_fitler_css_preload_and_print', '__return_true');<link rel="preload" as="stylesheet" href="https://example.test/wp-content/uploads/elementor/css/post-5.css" /><noscript><link rel='stylesheet' href='https://example.test/wp-content/cache/autoptimize/css/autoptimize_single_310a89fd1e8dc24a98b01a7ed7500698.css?ver=1616678114' media='all' /></noscript><link rel='stylesheet' id='elementor-post-5-css' href='https://example.test/wp-content/cache/autoptimize/css/autoptimize_single_310a89fd1e8dc24a98b01a7ed7500698.css?ver=1616678114' media='print' onload="this.onload=null;this.setAttribute('data-loaded', '1');" />
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘autoptimize_fitler_css_preload_and_print bug?’ is closed to new replies.