This post is the second in a series on tips for optimizing your law firm’s website speed and performance.
As a refresher, Google’s Page Speed Insight Rules are something you need to understand and pay attention to. Begin by plugging your URL into their PageSpeed Insights, and take a look at your current breakdown. You’ll notice two scores – one for Page Speed and one for Optimization. If what you find shows your site has room for improvement, check out these tips to start speeding up your site.
In the last post we covered some of the ways to get started, including compression, effectively using caching rules, and minifying. Today we’re going to focus on what you can do with images and other visible content.
Optimize your images.
Images are critical to website management. Accounting for 60 percent of your web page size, they have a serious impact on how quickly your site can load. If you optimize images, you can effectively reduce the file sizes without impacting the visuals. Here’s some ways to combat image issues:
- Always use relative sizes for images. Leverage the “picture” element when you want to specify unique images depending on device characteristics. For those who have a thorough understanding of web development, use a srcset attribute and the x descriptor in the img element to inform browsers when to use specific images.
- When possible, use CSS3 to replace images.
- Use vector formats when you can.
- Review and eliminate any unnecessary image resources.
- Test out different quality settings to find the optimum one. There is no single best format for all images, each combination of particular compressor and image contents produces a unique output.
- Cache any image assets.
- Using the picture element, specify different images based on device qualities. You can specify for device size, resolution, orientation, and more.
- Resize images on the server and serve only images scaled to their correct display size.
Improve CSS delivery
Browsers have several steps to follow when they render a page, and processing CSS is part of that process. If your CSS is loaded with render-blocking external stylesheets, the process will require multiple round trips which will delay the time to first render. Google recommends Inlining small CSS directly into the HTML document to eliminate small external CSS resources.
Highlight Visible Content
What we mean by this, is simply to prioritize the content that’s visible above the fold. If that content exceeds the initial congestion window (typically 14.6kB compressed), then loading it will take multiple round trips, thereby slowing the process. The fix is simple: reduce the size of any above-the-fold content to no more than 14kB compressed.
This blog captures some of the more technical tips our team uses to increase site speed and performance. We know not every law firm or legal group has a developer on staff to help address these issues and make these improvements. If you are interested in optimizing your law firm’s website, reach out to us. We can help – or at least point you in the right direction!