If your website fails this rule, you need to review the website optimization, install a caching plugin, and if you still can't pass this rule, contact a professional who can guide you better on the subject or contact the hosting provider if it is managed.
Specify browser cache
Browser caching is another easy rule to follow in Google Page Speed Insights, although as with compression, the changes we need to make vary depending on the web server we are using.
In Apache the process of enabling browser caching is similar to that of compression.
We only need to edit the .htaccess file, but on other servers like Nginx we will have to modify the configuration files.
You should be careful with the browser cache, since at certain times we may have problems updating content if we configure very high TTLs.
In any case, the minimum TTL imposed by Google Page Speed are quite low so they do not usually cause any problems.
This topic can really be a bit of a challenge, but if you search on the Internet for what you need to put in the .htaccess or in the corresponding configuration file, you will find it without any complications.
Within this section you will find the minification of HTML, CSS greece mobile database and Javascript files, which are the three text type files that are served to visitors.
Minifying is the process of optimizing files by removing elements such as comments and line breaks, abbreviating everything so that the final file weighs as little as possible and, therefore, the files download somewhat faster to the browser.
Minification can be done in several ways, including a module installed on the web server, but under normal conditions in a CMS like Wordpress it is usually done using a plugin like “Autoptimize for Wordpress”.
We must be especially careful with the minification of CSS and Javascript, since, if we do it without thinking and without control, we can break down the appearance of the website.
The same configuration is not always correct for all websites, it depends on the theme used and the elements they have.
Optimize images
Images are usually the heaviest part of a website, for this reason, we need to optimize images to reduce loading times by reducing the time it takes the web browser to download resources.
If Google Page Speed Insights shows us this error, what we have to do is easy, we have to optimize the images on our website.
We can optimize images in several ways: from the server, with a plugin, with an external service, with a local application, etc…
The most automatic way to do this is through a plugin.
In the case of Wordpress we can do it with EWWW Image Optimizer or if we use a Premium option, we can use the Kraken.io plugin with the corresponding Premium service.
This last option is much more efficient than the EWWW Image Optimizer option.
Some images, even if optimized with a plugin, will still be marked as not optimized.
In this case, we must manually optimize these images with another type of local application or reduce their size in order to lower their weight.
Optimize CSS delivery
This error doesn't usually appear much on modern websites, since normally all styles are put into a single CSS stylesheet.
In fact, this is why you are more likely to see an error saying “Prioritize visible content.