If you’re looking to make your site as fast as possible, and you’re checking with Google PageSpeed Insights, you’ll probably want to remove the Emoji scripts and styles to squeeze that little bit more performance.
Turns out, this is pretty easy to achieve.
How do we do it?
We just need to remove those actions from WordPress. We can do that by simply adding the following code to our
<?php /** * Remove Emoji Junk */ remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); remove_action( 'admin_print_styles', 'print_emoji_styles' );
So there you have it, a super simple way to remove Emoji junk from your WordPress website and squeeze out every little bit of performance.