@pakpenyo
litespeed-dummy.css is added by Litespeed so we can add our code in header.
Something is stopping the removal of CSS file.
What is the theme used? is it free?
Full custom theme. CSS/JS only works when needed. It’s already using compressed inline js/css for priority, and very light compressed css/js at wp_footer. I’m not using jQuery, fully disable for non admin user.
Lighthouse score is good, but thats dummy css blocking render.
Any code to unload/dequeue dummy css for already optimized custom theme?
@pakpenyo do you remove the id=" attribute from CSS/JS?
I have a fucntion to clean output
public function cleanStylesheetLinks( $html ) {
return ( new DOM( $html ) )->each(
static function ( $link ) {
$link->removeAttribute( 'type' );
$link->removeAttribute( 'id' );
if ( ( $media = $link->getAttribute( 'media' ) ) && 'all' !== $media ) {
return;
}
$link->removeAttribute( 'media' );
}
)->html();
}
Finally, the dummy CSS disappears if I disable the function.
Is there a solution for this? I like clean source code. Is the id attribute really necessary?
Thanks for finding the problem.
@pakpenyo
YEY 🙂
We are using the ID to remove the CSS file. You can leave it ON, but add exception for that element.
Thank you.