Clear Your <head> with the New Clean Up WP Box

by Chris Pearson · 10 comments

Since 2015, the WordPress development teams have settled into a disturbing pattern of adding “stuff” to your site’s HTML output without giving you a choice about whether or not you want or need it.

In some cases, these items can add nearly 2kb of code to every page of your site!

We now live in an era where performance is paramount, especially on mobile devices where connections are slower and attention spans are shorter. On top of that, search engines like Google preach speed and optimization above all else, and this means you need to be vigilant about keeping your site fast and fresh.

Given this reality, it seems odd that WordPress—the most widely-used platform for building and running websites—is so blasé about adding cruft to your site without your permission. Worse, WordPress fails to provide you with an easy way to get rid of the stuff you don’t need!

Look at This Mess!

Over the past two years, WordPress has added 3 things to your document <head>, and you probably weren’t even aware of them:

  • Emoji character support
  • oEmbed support
  • WP Rest API support

Because of the sheer amount of code added to each page of your site, emoji character support ranks as the worst offender here. And given how few people would ever use it, oEmbed support ranks as the most ridiculous. As for WP Rest API support…well, this one is actually pretty useful for Plugins, apps, and extended functionality.

Now, prepare yourself for a truly revolutionary approach to this problem…

Instead of just letting WordPress heap this stuff upon your site, it would be better if you could simply select what you want to run and omit what you don’t!

Shocking, I know. Take a deep breath, and then read on.

Let’s Clean Up the Mess

Cleaning up the cruft is easy with this new and free Clean Up WP Box from DIYthemes.

After installing and activating this Box, the default settings will have your site performing in a DIYthemes-approved manner. Of course, you can always visit the Clean Up WP settings page to tweak these options to your liking.

For more information, check out the Clean Up WP Box documentation.

About the Author: Chris Pearson, Thesis creator and DIYthemes founder, is obsessed with optimizing the web and making sure every last detail receives the attention it requires. You should follow him on Twitter here.

If you enjoyed this article, enter your email below to get free updates!

{ 10 comments… read them below or add one }

mark

Thanks for this Chris – excellent idea. It really irks me when I view source and see all that additional crap in my tag that I didn’t put there – and don’t need. For some reason the box won’t install but I left a thread on the support forums. But anyway just saying thanks for this – good thinking 99 🙂

Reply

Bernard Go

Thank you for this, Chris.

I’ve already installed and activated the Clean Up WP Box at BernardGo.com. I left the settings at the recommended configuration of:

Emoji: Disabled
oEmbed: Disabled
WP Rest API: Enabled

Reply

Brandon Cordoba

Thank you Chris!

Reply

Gabi

Hey Chris,

I’ve been using Thesis for 7 years now and I still love it.

Thanks for building something so awesome. I appreciate how you move with the times and make sure we all have the best to work with.

Reply

Shari

Just for clarification, and I agree it’s not always needed, however is oEmbed required if you insert video and just want to paste a Youtube url to do so?

Reply

Chris Pearson

Shari, the oEmbed code already included in the WordPress Admin takes care of things like video embeds for you.

By contrast, the oEmbed included on the front end (in your Skin, and what we’re talking about here) is intended to allow your content to be embeddable. A lot of people really don’t want that.

Reply

Akshay S Manoj

loved the post and theme, Thank You Chris Pearson

Reply

Thomas Shelby

Some Useful information, I really didn’t know about the Emoji character support, oEmbed support, WP Rest API support in the document head… Thanks..

Reply

Ajoy

Hi Chris, nice article over here. Thank you for you dedication to built something so useful here. I believe we all have some expertise to shine in our own way. Thanks anyway.

Reply

Mike Grath

when i was doing my web designing my teacher told me that we should try to reduce codes as much as possible as it increases site speed.

Reply

Leave a Comment