Lessons
-
Introduction
-
SEO
- Broken links
- Site map
- Semantic markup
- Robots.txt
- References
- Text
- Duplicates
- Basic
- Pictures
-
Speed
-
Minification
-
Minification of CSS to reduce its volume
Minification of the embedded JavaScript code of the page
Minification of the embedded CSS code of the page
Minification of images without loss of quality
Minification of JavaScript files to reduce its volume
Unused CSS code
Data optimization:Image URLs
Animated image format MP4, WEBM, SVG instead of GIF and WEBP
Unused JavaScript code
Using the WebP format in images
Too high-quality images without using compression
Suitable video bitrate
-
Reducing requests
-
An overabundance of small pictures
Grouping CSS files
Grouping JavaScript files
An overabundance of font files
Availability of end-to-end CSS, JS files
The presence of a monochrome font
Uploading duplicate files
Using JavaScript facades
Redirecting JavaScript code
Adding lazy loading
Redirect from/to www version
- Fonts
- Loading time
- Server Settings
- Pictures
-
The first content
-
The sequence of connecting JavaScript files
Font display mode
Setting up a pre-connection
Removing lazy loading
Long JavaScript code execution time
File upload delayed or on demand
The server is located in the same country where the users of the site live
No requests to another country that cause page loading to be blocked
-
Minification
-
Mobility
-
Screen support
-
Adapting the layout to a Full HD computer monitor
Adapting the layout for a horizontal tablet
Adapting the layout for a horizontal phone
Screenshots for the mini-report
How blocks break the page layout
Adapting the layout to an HD computer monitor
Adapting the layout for a vertical tablet
Adapting the layout for a vertical phone
- Comfort
-
Screen support
- Bugs
-
Convenience
- Social networks
- Web Application Manifest
- Favicons
- Basic
- Text readability
-
Vulnerabilities
- Encrypted connection
- Exploits
- Vulnerabilities
Minification of images without loss of quality
Images in JPEG, PNG, GIF, SVG format have the potential to optimize size without losing quality. This is due to the fact that graphic editors and cameras do not care about reducing the size of files. They also add background information (metadata) that increases the file size, but is not used by users’ browsers.
Use the following programs to optimize images:
- jpegoptim with the parameters
jpegoptim --strip-all --all-progressive [file path]for JPEG. - [pngquant](https://pngquant.org /) with the parameters
pngquant --force 256 [file path]and [optipng](https://sourceforge.net/projects/optipng /) with the parametersoptipng -i0 -o2 --strip all [file path]for PNG. To achieve maximum results, use both programs in this sequence. - gifsicle with the parameters
gifsicle -b -O3 [file path]for GIF. - svgo for SVG.
There are also free online services for image optimization. [Visual service for fine SVG optimization](https://jakearchibald .github.io/svgomg/).
Using these programs, you can set up automatic optimization of all images of your site once a day. The script code is presented below:
Demonstration
Bash script
#!/bin/bash
# Сначала установите программы optipng, pngquant, jpegoptim, gifsicle, svgo.
# Для убунту это делается с помощью команды:
# apt install -y optipng pngquant jpegoptim gifsicle; npm install -g svgo
# Замените ./ на путь до нужной директории
find ./ -type f -iname "*.png" -exec optipng --strip all {} \;
find ./ -type f -iname "*.png" -exec pngquant --ext .png --force 256 {} \;
find ./ -type f -iname "*.jpg" -exec jpegoptim --strip-all --all-progressive {} \;
find ./ -type f -iname "*.jpeg" -exec jpegoptim --strip-all --all-progressive {} \;
find ./ -type f -iname "*.gif" -exec gifsicle -b -O3 --no-warnings {} \;
find ./ -type f -iname "*.svg" -exec svgo {} \;