Optimize your images
If you have a content-heavy site like this blog the biggest part of your page content transfer is the images. You are probably used to just taking an image, maybe resize or crop it a bit, upload it with Joomla's Media Manager or JCE's Media Manager and call it a day. Good for you, but your images are very likely unoptimized and larger (in Kilobytes, not necessarily dimensions) than they should be.
Even easier, there's a free tool called ImageOptim for macOS which can run several of these tools against your images and choose the smallest file. It's dead simple. Drag and drop your image folder onto the tool. Wait until it's done. Your images are replaced with their optimized versions. Obviously this should first be done on a local copy of your site. You could use Akeeba Backup to create a backup of your site and restore it locally to work on your site.
Please don't ask me about alternatives for Windows and Linux. I have not had the need for any, I haven't looked for any, I haven't used any.
Make your images adaptive
You already know that your site will be displayed in devices with different screen sizes: sub-5" bargain bin budget Android phones, 6" mainstream smartphones, 7"+ phablets or small tablets, 10"-11" tablets, 13"-15" laptops and massive 23"+ desktop monitors. You have already taken that into account by making your site responsive which means that your content scales and your design contorts itself to the interaction modes that are most appropriate for the screen size your site is rendering in.
But what about your images?
When your target devices range from a 380px wide budget phone to a 5120px wide desktop the same image file is not appropriate for all sizes. If you optimize for the small screen the image will look blurry and pixelated on the big screen. If you optimize for the big screen then most of your visitors are downloading an unnecessarily big file to display a much smaller image. Optimizing for the most common device size in your audience is the worst of both worlds: small devices download a big file and big screens show a blurry photo. If you also start taking into account HiDPI devices with pixel densities that are 2x, 3x or 4x the standard screen density (the standard is, by the way, 96 pixels per inch) you have quite the puzzle to solve. Do you go for a reasonably small file which will display badly on a lot of devices or a massive file which does display great in all devices but is in the ballpark of a couple Megabytes big?
Luckily, you do NOT have to choose. Browsers have long supported adaptive images. In short, using the PICTURE element with the appropriate media queries you can select the right image file for the screen your site is being rendered on. If the display size changes, e.g. the user rotated their device from portrait to landscape or resized their browser window on the desktop, the browser will smartly figure out what to do. If it has a large enough image it will scale it down. If it doesn't and you have hinted in your PICTURE element that a bigger image is available it will load the bigger image. While the bigger image is being loaded the smaller will appear scaled so from your user's perspective there's a bit of blur in the images that quickly goes away.
Another magic thing you can do with the PICTURE element is have the browser select the most appropriate file format it supports. Most images on the web are JPG or PNG. These are legacy image formats, dating back to the 1990s or even earlier. Most modern browsers also support WEBP, a much more efficient image file format which results in much smaller files while supporting transparency. From your perspective as a site builder it's like PNG on steroids. Unfortunately, you can't just go ahead and convert everything to WEBP because older browser versions (and all versions of Safari, as of this writing) do not support WEBP at all.
By now you might be clutching your head in despair. What was simply uploading a single image file and putting an IMG tag in your content has now become a puzzle which require you to create various different image sizes and image types. This is difficult for you, the site integrator, and outright impossible for your clients.
Luckily, there are third party Joomla extensions which can handle that for you. I have used XT Adaptive Images Pro. This site does not use this extension. Instead, I wrote a small library and a special layout override to automatically convert images as they are needed on my site. However, I am not your typical site integrator, I am primarily a backend developer. I found it easier to write customised PHP code for my site than use a third party solution. For everyone who's not me I strongly recommend using a third party extension to implement adaptive images.
Another point to be made about images is that illustrations (as opposed to photographs) typically start their life as a vector file in something like Adobe Illustrator or Affinity Designer. What we usually see is that these are converted to transparent PNG files before being used on a site. This is the least efficient way to go about it. Browsers have long supported scalable vector graphics (SVG) files, small text files which describe vector graphics. They tend to be much smaller than file formats optimized for photography (JPG, PNG and even WEBP), they are far more compressible due to them being plain text and can be scaled to any size from tiny to humongous on any screen resolution without losing crispness. The problem is that Joomla 3, by default, won't support SVG files for political reasons masqueraded as security concerns(*). If you want to use the far more efficient SVG files for your illustrations you can install my Joomla SVG Support plugin. I also recommend using JCE Pro and its media field override to make it easier to select SVG and other media files in third party components. One final note of caution: do not try to use SVG files in elements which expect to get their size from the content (SVG files do not have an intrinsic fixed width and height for all the browser cares) and don't try to use SVG files as background images. There are ways to do both but chances are you'll suffer unnecessarily.
Moreover, the browser doesn't magically know which files to download, HTTP/2 Push magically pushing some of these files with the main HTML content notwithstanding. It needs to parse the HTML page and start downloading files as it realizes they are required. This means that the JS and CSS files will be fully loaded by the browser at different points in time. Meanwhile, the browser can't just sit there twiddling its thumbs. It starts figuring out how to render the page and starts putting stuff on the screen. When a new CSS or JS files comes it stops what it's doing, parses the file and starts all over. The more files you have the more it has to stop and restart what it's doing. This means that your site's pages are slower to display in full, they "flash" a lot as content has to change positions on the screen and are harder on mobile devices' battery because the browser needs to expend much more effort to render your page. In short, the user experience SUCKS.
This is an easy problem to solve when you are in full control of the entire web application that generates your site: you know which bits of CSS and JS are used on each section of your site and combine them in one minified and compressed file before deploying the application. It also means that you have a large IT sub-department dealing with just the site and spend thousands to millions of dollars to maintain your site. On the other end of the spectrum we have sites based on off-the-shelf CMS like WordPress and Joomla which are an integration of a platform with various third party software. In our case that would be Joomla (the core CMS libraries) and all of its first- and third-party extensions. Each extension has its own CSS and JS files. Extensions don't know about each other and there's no support in Joomla itself for combining their CSS and JS files. It's easier and cheaper to build a site this way but performance sucks, as explained above.
You can use third party extensions, like my Combinator plugin, to force Joomla to combine individual CSS and JS files into a single file. I am using this plugin on this blog. It is a lot of work with a lot of trial and error to get everything just right but it pays dividends if your site is primarily accessed by mobile devices on cellular connections like this blog here.
Using a CDN
All of the above are great to know and even bother implementing at least once so you can fully appreciate the impact they have on the site's performance. There's something to be said, however, about the viability of maintaining these harder to employ site optimizations on dozens or hundreds of sites, i.e. the active maintenance site fleet of a typical web agency. At this point you may consider paying for CloudFlare instead.
CloudFlare is a combined CDN, site optimization and site security service. As a CDN it has nodes all over the world which will deliver your static files and cached pages lightning fast to your site's visitors. The optimization features it offers can automatically handle compression of your static resources and even combining JS and CSS (Rocket Loader). There's a small cost attached so it's not something I recommend for every site. For example, I am using CloudFlare on our business site but not this blog.
To be continued
Come back tomorrow for Part IV: Site building calisthenics.