Today I was doing my (sometimes) daily reading when I came across this article from Hacker News. The article talks about the end of special treatment for Google's AMP links (basically higher rankings), but what caught my eye was the apparently public testing for how 'good' a site is according to Google. I'm not especially interested in SEO, but I figured it would be a good litmus test to see if there was anything about how I'd created my site that was especially egregious.
I found the site used to test was PageSpeed Insights, which is great because it's actually a Google tool and not somebody taking a guess at how Google grades things. Sadly after sticking in my URL I discovered I wasn't perfect (who knew), except in the 'Best Practices' category.
Performance
The feedback here was: Total Blocking Time is too long due to 2 scripts loading.
Scripts! I don't have no scripts!
Turns out it was right, there were two scripts that were loaded with every page. These were courtesy of Cloudflare, so that's where I went to find answers. After looking all over to determine what the scripts were for and how to make them load faster I decided it would be best to just eliminate them, so here's what I did:
Accessibility
Very straightforward for this, Google complained about my non-sequential header tags (H5
directly following H1
), so I made them sequential and used font-size
to give the same effect.
SEO
"Malformed robots.txt"
Ya, I'd intentionally not had a robots.txt because I'm not convinced it actually does much besides give folks ideas on where the good stuff is. But...I was really enjoying watching my percentage go up at this point so I caved and added an allow-all (user-agent: *
) robots.txt.
Finally, (the end of the night at this point) I did it. 100%!
I have no doubt this exercise did virtually nothing for my site but I did enjoy it still. It does feel a bit cheap that most of the reason my site is 100% is because of big decisions in functionality that just can't be replicated by most production websites. Ex: the slow-loading scripts. Cloudflare is a huge CDN and the scripts are coming directly from them every time so it's not clear how I would solve a slow-loading scripts problem in the 'real-world' where you can't always just...remove them. None-the-less I'd recommend throwing your site(s) in the PageSpeed Insights tool from time-to-time and seeing if anything sticks out as fixable!
Happy Hacking!
- Chris