Finding out what's in the <head>?

Hello I’m new. Recently I started making a website with a strict page weight of 30kB. One page was over budget, so I started looking for things I could safely remove from the page.

I was delighted to find out from the almanac that <link rel="icon" href="/favicon.ico"> is redundant as browsers look at the domain root for favicon.ico.

This got me looking at all the other things I and others stick in their <head>, and I’ve since found that most of it is either totally useless, or has a work around that allows you to remove the tag.

I’m writing up all my findings in an article hoping that people will remove these tags from their sites — I know these optimizations are tiny in comparison to what can be achieved with images and video — but it’s something.

I’d love to have some statistics on what <meta> and <link> tags people are using. For instance, how many sites are including:

<meta name="HandheldFriendly" content="True">

A tag that tells the AvantGo browser that you’ve optimized your website to work on a Palm Pilot!

Anyway, I’d love some advice on how to get this infomation. I’m going to start following the Getting Started Guide and finally get round to learning SQL.

Thanks, i’ve really enjoyed reading back on older posts, really interesting stuff.

2 Likes

Hi Nathaniel,

I think the best option would be to leverage custom metrics that parse the DOM at runtime and emit stats/data that we can analyze later in BigQuery.

For example, we already have a custom metric that reports on all meta tags in the document head:

You could query that metric to get info about your HandheldFriendly example.

I’d suggest making a list of all of the things you’d want to analyze in the head and we can see which are already available as custom metrics, and implement the rest.

Rick

1 Like