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 original size of the image and the size of its display area
Using sprite technology
Recompressed images with artifacts
Cropping monophonic fields in images
-
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
Recompressed images with artifacts
In any graphic editor, when saving an image in JPEG format, you can specify the compression ratio. The lower it is, the more blurry the image will be, but at the same time the file size is reduced.
Blurry images are perceived by users as of poor quality, which lowers the site’s rating in the eyes of users. This problem is especially relevant for product photos. Poor-quality images will simply spoil the impression and will make the goods cheaper.
Use JPEG images with a minimum quality of 90.
Demonstration of image changes with reduced quality:
Demonstration
PHP code
HTML code
<?php
$image = imagecreatefromstring(file_get_contents('./photo.jpg'));
$qualities = [90, 80, 50, 30, 10, 1];
foreach($qualities as $quality) {
if(!is_file('./photo-'.$quality.'.jpg'))
imagejpeg($image, './photo-'.$quality.'.jpg', $quality);
}
?><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
img {
width: 100%;
}
</style>
</head>
<body>
<div class="grid">
<?php foreach($qualities as $quality) {?>
<div>
Качество <?=$quality?>% размер <?=filesize("./photo-".$quality.".jpg")?> Б
<img src="./photo-<?=$quality?>.jpg" />
</div>
<?php } ?>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
img {
width: 100%;
}
</style>
</head>
<body>
<div class="grid">
<div>
Качество 90% размер 56723 Б
<img src="./photo-90.jpg" />
</div>
<div>
Качество 80% размер 36026 Б
<img src="./photo-80.jpg" />
</div>
<div>
Качество 50% размер 19558 Б
<img src="./photo-50.jpg" />
</div>
<div>
Качество 30% размер 15295 Б
<img src="./photo-30.jpg" />
</div>
<div>
Качество 10% размер 10245 Б
<img src="./photo-10.jpg" />
</div>
<div>
Качество 1% размер 7680 Б
<img src="./photo-1.jpg" />
</div>
</div>
</body>
</html>