If you are reading this tip in the Source section, then you are probably already a Source user and you are on the right path to achieve a 100% result. (I have yet to see a real RW site built with any other framework achieve a 100% Desktop, 99% Mobile result.)
If you are not using SOURCE, then the following will improve your score, but is very unlikely to get you to 100% desktop & 98% or 99% mobile.
I have built many real Source sites that have achieved a 100% Desktop and 98% or 99% Mobile result, using the guidance below. The mobile results simulate a slow mobile data rate delivery of content, so it can penalise many real sites expecially if you have many large BG images (say half a dozen 500Kb images), but if you get 99%, then you have created a super quick site. Also make sure you run the test a few times because it does seem to vary at different times of the day.
PageInsights is often criticised, but I think it is still a valuable web site analysis tool that will give you insights about how you can improve your score or just confirm you are following best practice. Anything that points you in the right direction is a good thing, but the report needs to with an understanding of proportion.
Based on my experience using SOURCE, you can generally ignore any advice in the results below:
- Use next gen image formats such as Google’s
.webPand other better formats are just not supported widely enough. Only the latest versions of Safari on the latest versions of macOS supports
.webP. Why build a site that most visitors won’t see your images? Sites built with correctly sized
.pngimages can get 100%.
- Ignored advice to
Avoid an excessive DOM size.
- Ignore advice about
Serve static assets with an efficient cache policy.
Does not use passive listeners to improve scrolling performance.
- Generally, ignore 1 instance of
Image elements do not have explicit width and heightif you can’t define the dimensions.
Run a PageSpeed test on https://webdeersign.com which is a complex site, and you will see that these issues reported above don’t stop getting a 100% result.
- Use Source - the most important thing here.
- Do not load more than 2 large local fonts. 30Kb-50Kb each is just about OK. Go here to subset your Google fonts and download in woff2 format. Eg OpenSans 400 can be subsetted and converted to a woff2 file with a size of 11k.
- Don’t use FontAwesome or any other icons. Use SVG symbols with a Grid soluion to align. Many stacks load FontAwesome icons just to use 1 or 2 icons. The best stacks draw the icons.
- Do NOT use any NON Source stack unless the developer makes a big thing about efficiency and size. Generally, stacks such as Splider, Faq, Animate, etc. & any BWD stacks fall into this category (others too). If in doubt, ask the developer. Almost everthing you need is availabe in Source and will already be loaded to your site on the first Home page load.
- Don’t load anything else you don’t need, e.g. - don’t add the Source Smooth Scroll, which even though is already tiny, don’t add it unless want to use it.
- Important size your images in a graphic app or a resizing app in Google’s free SQUOOSH app to the maximum size that the images will be displayed.
- Resize your images, and optimise your images (in one operation) with the free
ImageOptimSQUOOSH app or other. Use an App that resizes and optimises in 1 process to avoid an additional SAVE which will degrade your image. Do this individually for each image for best results as a signifiicant extra amount can be saved by adjusting the optimisation in SQUOOSH for each image.
Important define the size of your images using the Source Image stack - Custom Attributes box and enter
width="300" height="50"adjusted for your images. Set width to 100%.
- Add a
loading ="lazy"onto the above Attribute, i.e.
width="300" height="50" loading="lazy"to lazy load the image for any images that do not appear in the first fold, i.e. on the first content viewed on a page before you scroll down.
- Enable compression on your server.
Use of correctly served webP images is absolutely a good thing to do and your site will be reduced in size. If you’resing a SOURCE site, this may get your mobile score to 100%.
Edit Addition 2:
I have included most of the information on this topic with more information into a set of posts on my blog at https://www.webdeersign.com/blog
WARNING. Replacing all images with optimised webP images is not a solution, because there are many Safari users who will not be able to see your images. Use of webP images needs a fallback so that if the page visitors Safari (IOS and macOS) cannot display webP images, then a fallback jpg/png image will be downloaded, and used instead of the invisible webP image.
Feel free to treat yourself to either of the badges below: