Website Utilities

Introduction

Creating a website is relatively easy and browsers are very tolerant of small mistakes in HTML and CSS. What they show might not be what you want, but they will try and show something rather than a blank page. But, web page authors should still try to keep up with the latest techniques and code. Over the years HTML, CSS and JavaScript has changed and although most still work, such as deprecated tags in HTML, there are now better ways of writing pages.

Almost every editor now has code hints and there are utilities around to check your site for accessibility, errors and loading speed. Other utilities will check for server vulnerabilities. Others still will minimize the JavaScript and CSS files, others will even minimize the HTML page itself.

I may as well say something about a pet peeve of mine. Sometimes when you look at a website's source code the first page before scrolling down is full of included CSS and JS files. What on earth for? Do people really need to load everything on every page? Perhaps they do, but for myself I won't load the libraries for FancyBox, Google Charts, Prism or anything else I use unless the page actually uses them. The files themselves may be tiny, perhaps even just a few kilobytes, but they use resources.

Woktron has a good, understandable guide to optimizing Apache for performance.


The Utilities

The idea behind all of these utilities is to provide a page free of errors and load it as fast as it can be into the browser. I'm not even sure if it is possible to optimize a website or page to pass every test, but these point out the major bottlenecks. Here are some of the tools I use:

Accessibility

The W3C page Web Accessibility Evaluation Tools List has 160 validators. As I mostly use Chrome, I installed two Chrome Browser Extensions, axe DevTools and WAVE. I also use the online Accessibility Checker, Accessible Web, and ADAScan βeta.

Analytics

These analyze the website traffic more than validate them, but they are useful in their own way. For someone who runs a website it's always nice to know that people are visiting it. This site gets around 100 visitors a day, my site about HMS Gambia gets around 14 and my old offroading site is lucky to get any visitors at all. But website analytics should be much more than that. I want to know how people are finding the sites, which pages are most popular, and if any pages are having problems. The online one I use is Google Analytics.

Web Server logs can also be analyzed. There are several of these utilities but the classics were Analog, AWStats and Webalizer. The original Analog site, www.analog.cx, is long gone but luckily it was mirrored. C:Amie took Analog on as a maintenance project. The files can no longer be downloaded from that site but are available from GitHub. The results displayed by Analog are mostly text based, but can be "beautified" using Report Magic.

The original Webalizer site has also gone, but development was continued by Stone Steps Inc. As with Analog, the files are no longer available from the site, but can be found on GitHub.

Authority

The better a site's authority the higher it should rank in search engine results for similar sites. A site's authority score on its own is not involved in a search engine's page rank calculations but the methods used to determine a DA score, such as the number and quality of backlinks, are. Diffferent companies have come up with various methods of measuring a sites authority. Majestic uses Trust Flow (TF) which measures the quality of backlinks and Citation Flow (CF) which measures the total number of backlinks. Moz uses their Domain Authority (DA) tool. Ahrefs uses their Domain Rating (DR) tool.

Ahrefs gave my site a DR of 33, with 3.1K backlinks and 637 linking sites.
Digital Trust gave this site a Trust Score of 73 with a Reputation Score of 100
Linkody gave this site a DA of 42, TF of 20 and a CF of 31.

Compression

My "Server in the Cellar" has Apache's gzip deflate option turned on, and the CSS and JS files are minimized. Using tools such as Check Gzip/Brotli Compression and HTTP Compression Test, my pages have between 60% and 75% compression. Brotli Compression may be a better choice now. It offers both better compression and faster compression/decompression than GZip. It is now supported on all major browsers. It is possible to enable both on my Apache server, if Brotli is enabled but the browser does not accept it then it will fall back to GZip.

Content Security Policy (CSP)

There are several tools available to check the validity of a website's Content Security Policy (CSP) among them are Content Security Policy (CSP) Validator, CSP Evaluator, Csper Policy Evaluator, Hardenize, Mozilla Observatory, Pentest-Tools Website Vulnerability Scanner, and Security Headers.

CSS

I use the W3C CSS Validation Service to check I haven't made any dumb mistakes in the site's CSS file. The W3C Nu HTML Checker can also check CSS files. I minimize it using Minify which can also handle JS files.

Editor

I've been using Adobe DreamWeaver to edit the pages for several years. The HTML hints are great. The only downside to the program is the spell checking. Every other editor has automatic spell checking, DreamWeaver never has and it is annoying. Everyone makes mistakes spelling at some time or another and it would be nice if checking was done as you type.

HTML

I use the W3C Nu HTML Checker and W3C Markup Validation Service

Images

Apart from video, images are the largest content of most websites. I optimize the images I use in Adobe Photoshop, but Cloudinary Website Speed Test is optimized to show which images are slowing your website down.

JavaScript

Tools such as the Google Closure Compiler "analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls." Unlike a normal compiler it does not compile to machine code but to "better JavaScript." The documentation for it is here. JSLint is also good at tidying up JavaScript and looking for mistakes. It can be a little too strict at times and sometimes trying to make optimize the code to their rules breaks it when it is minimized. I minimize it using Minify which can also handle CSS files.

Links

Xenu Link Sleuth has not been updated in years, but it's still very good at what it does. The W3C Link Checker is good as well.

Minification

This is the process of removing all white space and line breaks from files. It reduces the file size without more aggressive compression. I use Minify which can handle both CSS and JS files. I should add that I run my own Apache webserver, the "Server in the Cellar", and that has the gzip deflate option turned on. The Gift of Speed site also has several minifiers and speed tests.

Mixed Content (HTTPS vs HTTP)

There are sites that will check individual pages for mixed HTPP and HTPPS content, but there are others that will attempt to crawl an entire site. Two of the best I have found are JitBit SSL Check and Missing Padlock - SSL Checker. HTTPS Checker has a free downloadable checker. It works very well but the free edition is limited to 500 pages, this is OK for my sites.

Mobile Friendly

Some test are designed to test if the pages are mobile friendly. Google has two tools for doing this, Google PageSpeed and Mobile-Friendly

Page Loading Times

Some tests measure everything about a page and gives results on an analysis of the whole thing. The tests I use are: Catchpoint Web Page Test, GTMetrix, Solarwinds Pingdom, Whats My Ip's HTTP Compression Test, Yellow Lab Tools, and of course Google PageSpeed. I should add that I run my own Apache webserver, the "Server in the Cellar", and that has Apache's gzip deflate option turned on, and the CSS and JS files are minimized.

When I ran these tests, the results showed one major thing I should change and that's Apache's cache. Other things that were slowing the page loading time down were not actually part of the page but the stuff added by Google Analytics and Microsoft Clarity.

Before optimizing Apache's cache the following scores were obtained: CatchPoint: "Not Bad"; GTNetrix: A; PageSpeed: Mobile-78, Desktop-100; SolarWinds: C (77); Yellow Lab: B (72).

The Gift of Speed site also has several minifiers and speed tests.

Public Availability

There are two types of tests to show whether a site or individual pages are available publicly. For a simple site test there are places like Down for Everyone or Just Me, Freshping, and Is It Down Right Now. To see what an individual page looks like then there are services such as GeoPeeker, LocaBrowser, and WebPageTest. These last three are good for checking pages that should be private but for some reason are public. If there is a problem then Gibson Research Corporation's ShieldsUP! can help identify which ports are open or not.

Search Engines

In June 2021, according to StatCounter, Google was used for 92.47% of worldwide searches while Bing was used for just 2.31%. Statista, gave Google an 87.76% share and Bing 5.56%. Google has Google Search Console which offers useful insights. I use the reports to look for pages that are giving 404 page not found errors. Although Google is the most used search engine by far there is also Bing Webmaster Tools.

Server

As I run my own Apache webserver, the "Server in the Cellar", I'm interested in tools that can help optimize and protect it. Some of the better ones I've found are Detectify, this company once offered free scans for a single site. I started using it and they still scan it, even though the offer was withdrawn years ago. Ionos Website Checker, Mozilla Observatory, and Pentest-Tools Website Vulnerability Scanner are also useful.

Server Status

I have enabled Apache's mod_status module on my site, that produces a server-status web page. Other sites also have this page enabled. To find them, search the internet for unique, static text on the page such as "total entries stored since starting:"

Site Information

By default a web server gives a lot of information about itself. Sites like BuiltWith, Netcraft, and W3Techs can display a lot of information about any site.

Sitemap Validators

A malformed sitemap.xml file means that search engines and other utilities cannot index the site properly. A simple typo can invalidate every line after it, sometimes affecting thousands of pages. When using these tools it may be necessary to look at the entries before the line reported as giving error to look for the malformed entry. Three utilities I found useful are My Sitemap Generator, Website Planet, and XML Sitemaps.

SSL Certificates

I use Let's Encrypt to supply the SSL Certificates using CertBot but there a range of Automated Certificate Management Environment (ACME) clients to manage the certificates. Qualys SSL Labs can check the certificates on the website as can Ionos SSL Certificate Checker.