Matt Hobbs avatar Matt Hobbs

Why you should be testing your 404 pages web performance

Screenshot of “Why you should be testing your 404 pages web performance”

Nice overview of the issue encountered by users if your 404 error page weights too much, with actual data from HTTP Archive.

Assuming that an optimised 404 page is only required because users will mistype a URL in their browser is short-sighted. As the HTTP Archive data has shown, there are many other reasons why a user may encounter a 404 response (even if they have no idea they actually are!). The web performance impact of a users browser loading an unoptimised 404 page can be huge, and it can have a real impact on their experience of your whole site. All it takes is a forgotten file or misplaced ; in some JavaScript, and your users could be encountering it.

I would add[1] that looking at 404 errors in your own HTTP server logs (or your CDN ones) will reveal some interesting patterns, like those from Netlify Analytics I've shown in this note.

Some of these patterns are not listed in Matt's article because these are not resources actually linked from pages, "visible" by HTTP Archive's crawler.

They can be malicious attempts to hack your site (/wp-login.php for WordPress for example), files automatically requested by browsers not used by HTTP Archive's crawler (apple-touch-icon.png requested only by Safari on iOS for example), etc.

  1. I could have just linked to my article written back in 2008 on this topic (!), but it's in French… ↩︎

  1. Surveillez vos erreurs 404, elles peuvent être très instructives

    A l’heure où tout le monde ne jure que par l’optimisation du référencement — on dit Search Engine Optimization, ou SEO, pour faire branché — afin d’augmenter son trafic, et ainsi ses clients potentiels et/ou son revenu publicitaire, qui se soucie de vérifier ce qui se passe pour les internautes qui arrivent bien sur le site, mais sur une page qui n’existe pas, indiquée comme il se doit par une erreur HTTP 404[1] ?